I want to change the layout, colors, or other template-controlled features of a page, based on the user's FrontEndUser id. I had thought that I could just create one giant master template file that will actually contain each desired template, with each template protected by appropriate CustomContent tags. Then I use the master template file on each page, and the CC tags ensure that the appropriate template is displayed to the appropriate users.
BUT, I can't protect stylesheets with CC tags, can I?
Is there a way to accomplish different page layouts based on the user's FEU id?
templates based on FEU group
-
cyberman
Re: templates based on FEU group
Think the parsing of such an giant master template will eat too much of your server power.jmcgin51 wrote: I had thought that I could just create one giant master template file that will actually contain each desired template,
One of possible ways could be:BUT, I can't protect stylesheets with CC tags, can I?
Code: Select all
{cms_module module=CustomContent}
{if customcontent_loginname == 'member'}
{stylesheet name='member'}
{else}
{stylesheet name='guest'}
{/if}If you read at modules help you will see the other way too
Re: templates based on FEU group [SOLVED]
thanks, Cyberman!
-
calguy1000
- Support Guru

- Posts: 8169
- Joined: Tue Oct 19, 2004 6:44 pm
Re: templates based on FEU group
Yes, this will work for the stylesheets, cyberman's syntax is a bit off, but it's close.
However, you'll want to use the latest and greatest SVN copy of CMS, or 1.0.3 when it comes out, as there's a bug fix in template caching that will cause you problems if you don't have it.
However, you'll want to use the latest and greatest SVN copy of CMS, or 1.0.3 when it comes out, as there's a bug fix in template caching that will cause you problems if you don't have it.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Re: templates based on FEU group
ok, thanks!
-
cyberman
Re: templates based on FEU group
Please correct me - I'm not a coder for real. I've only tried to adapt the helpcalguy1000 wrote: cyberman's syntax is a bit off,
-
calguy1000
- Support Guru

- Posts: 8169
- Joined: Tue Oct 19, 2004 6:44 pm
Re: templates based on FEU group
This should work:
{cms_module module=CustomContent} <<-- Not needed/color]
Actually, I think the {cms_module module=CustomContent} tag isn't needed at all any more.
{cms_module module=CustomContent} <<-- Not needed/color]
Code: Select all
{if $customcontent_memberof_Users}
{stylesheet name='member'}
{else}
{stylesheet name='guest'}
{/if}Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.

