Share » Forums » General » change the pagelayout

change the pagelayout

change the pagelayout

Wednesday 03 August 2005 6:50:23 am - 2 replies

Author Message

Arran Price

Wednesday 03 August 2005 4:32:12 pm

Hi,
depends on how different you want the pages to be I suppose. You could create 3 different pages and then have pagelayout.tpl import the appropriate one based on the user.
Or you could have one template and hide/show parts dependant on the user. You need to consider that just not showing the links to content dosent prevent access to it - you will need to make sure your roles etc provide that security if you require it.

Heres a sample bit of code which we use to show the login/logout button dependant on wether the user is recognised or just anonymous - which may be useful.

            {let current_user=fetch('user','current_user')}
               {section show=$current_user.login|eq('anonymous')}
                  <li> <a href="/index.php/intranet/user/login"> <image src={"/images/top_nav/icon_log_on.gif"|ezdesign} border="0"> log on</a> </li>
               {section-else}
                  <li> <a href="/index.php/intranet/user/logout"> <image src={"/images/top_nav/icon_log_out.gif"|ezdesign} border="0"> log out</a> </li>
               {/section}
           {let}

Hope that helps

Arran

jb bianchi

Thursday 04 August 2005 6:34:34 am

hy,

Thank's for the answer but now i want to know the user 's group of an personn.
How can do it?
it is a fetch too?

thank's.

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu