1
Krispy
Links in Theme based on user groups
  • 2008/1/17 18:20

  • Krispy

  • Just popping in

  • Posts: 19

  • Since: 2006/7/11


I am working on a theme that needs to have links in the header/top nav that must be based on user groups. I know I can include <{if}> statements based on if the user is admin, user, or guest, but can I include one for user group?

For example, I have a link that only users in group ID 4 can view, is there an <{if}> statement that restrict that link from showing unless the logged-in user is in group ID 4?

2
mboyden
Re: Links in Theme based on user groups
  • 2008/1/17 20:19

  • mboyden

  • Moderator

  • Posts: 484

  • Since: 2005/3/9 1


No, groups don't exist in smarty variables unless defined in the php code some way. However, you could also use some php code in the template, the set a smarty variable with that information then accessible in the template for further usage.
Pessimists see difficulty in opportunity; Optimists see opportunity in difficulty. --W Churchill

XOOPS: Latest | Debug | Hosting and Web Development

Login

Who's Online

349 user(s) are online (239 user(s) are browsing Support Forums)


Members: 0


Guests: 349


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