1
JasonMR
Identify UserGroup for Block Content Display
  • 2004/11/1 23:44

  • JasonMR

  • Just can't stay away

  • Posts: 655

  • Since: 2004/6/21


I can use <{if $xoops_admin}> to display content only to admins.

I can use <{if $xoops_user}> to display content for logged in users.

My question::I have 5 UserGroups, and want to display parts of a block, only for specific groups. While I could just create different blocks and assign access rights to the groups, that are suppose to see them, this solution would be a hack, and ignores the power of a CMS.

To be more specific::I am trying to create a site specific User Menu. What I want to have/know, is a/the variable for the if clause!

Does anyone know how I could achieve the desired outcome, in a clean coded manner?

2
Dave_L
Re: Identify UserGroup for Block Content Display
  • 2004/11/2 0:49

  • Dave_L

  • XOOPS is my life!

  • Posts: 2277

  • Since: 2003/11/7



3
JasonMR
Re: Identify UserGroup for Block Content Display
  • 2004/11/2 14:56

  • JasonMR

  • Just can't stay away

  • Posts: 655

  • Since: 2004/6/21


Thanks Dave for your reply, though I hadn't noticed earlier, as I forgot to tick notify....

The link you provided is a php solution, I was looking more for a Smarty solution.

I tried this, after checking the Smarty doc's:
Quote:

<{if $group == '2'}>
TEST LINK
<{/if}>

...to no avail....

Can someone explain why? By the way, I also tried unquoting the group variable.

4
Dave_L
Re: Identify UserGroup for Block Content Display
  • 2004/11/2 15:49

  • Dave_L

  • XOOPS is my life!

  • Posts: 2277

  • Since: 2003/11/7


Where is the value assigned to the variable $group?

Login

Who's Online

327 user(s) are online (246 user(s) are browsing Support Forums)


Members: 0


Guests: 327


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits