ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Is member group description accessible in templates?

November 08, 2012 1:06pm

Subscribe [1]
  • #1 / Nov 08, 2012 1:06pm

    ciadeveloper

    10 posts

    Is it possible to access the member group description field in my site templates?  I’ve found the {member_group} and {group_title} tags (for the logged in member’s group id and title) and the {group_id} tag (for the group id for the logged in member or channel entry author depending on context).  However, I haven’t seen a tag for the group description.  Am I overlooking it or is it not accessible?

  • #2 / Nov 08, 2012 1:37pm

    glenndavisgroup

    436 posts

    I don’t think that is possible. You will have to do it using the query tag. Something like the following:

    {exp:query sql="select group_description from exp_member_groups where group_id = '{member_group}'"}
    {group_description}
    {/exp:query}

    I hope that helps.

    Mike

  • #3 / Nov 09, 2012 1:43pm

    Shane Eckert

    7174 posts

    Hey there ciadeveloper,

    Mike is right, and I like his solution.

    What do you think?

    Cheers,

  • #4 / Nov 09, 2012 2:23pm

    ciadeveloper

    10 posts

    Yeah, performing a query to grab the information is workable.  Thanks to you both.

    —Christian

  • #5 / Nov 09, 2012 5:14pm

    Shane Eckert

    7174 posts

    Hey ciadeveloper,

    I am glad that Mike was able to help!

    If you need anything else, please just let me know by opening a new thread.

    Cheers,

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases