Two templates in ONE theme? Two templates in ONE theme?
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

Two templates in ONE theme?

Started by photo2pictures, October 18, 2010, 09:18:59 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

photo2pictures

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?
Have expertise in HTML and CSS, but PHP is still a bit unclear for me...

Αndré

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'.

photo2pictures

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.
Have expertise in HTML and CSS, but PHP is still a bit unclear for me...

Αndré

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.