forum.coppermine-gallery.net

Support => cpg1.5.x Support => cpg1.5 themes (visuals) => Topic started by: photo2pictures on October 18, 2010, 09:18:59 pm

Title: Two templates in ONE theme?
Post by: photo2pictures on October 18, 2010, 09:18:59 pm
Can I have a template for GUESTS and a template for ADMIN/REGISTERED users? I need one type of template layout for GUESTS and another type of template layout for ADMIN/REGISTERED, and the change between the two layouts must happen automatically at login and logout.

Is it possible?
Title: Re: Two templates in ONE theme?
Post by: Αndré on October 20, 2010, 02:34:59 pm
Of course you can check if a user is currently logged in and display different content. Not sure what exactly you mean with the word 'template'.
Title: Re: Two templates in ONE theme?
Post by: photo2pictures on October 20, 2010, 07:40:57 pm
What I mean with "two templates" is, that you have the default template.html in your theme folder and CPM distributes this template when a visitor hits the site. If a user choose to login, CPM could distribute another template, for example "template2.html" (still from the same theme folder). There is a left column, the content and a right column, and the situation could be, that I wanted the right column to disappear and change the layout from a 3-column to a 2-column layout, when a user logs in.
Title: Re: Two templates in ONE theme?
Post by: Αndré on October 20, 2010, 08:14:38 pm
I don't know if/how that works. Maybe it's the wrong approach. I'd add all columns by default and just remove the third column if the user is a guest. Or maybe just use placeholders for your additional columns and populate them if a registered user visits the gallery.