Advanced search  

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Pages: [1]   Go Down

Author Topic: Two templates in ONE theme?  (Read 3232 times)

0 Members and 1 Guest are viewing this topic.

photo2pictures

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 7
    • PHOTO2PICTURES
Two templates in ONE theme?
« 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?
Logged
Have expertise in HTML and CSS, but PHP is still a bit unclear for me...

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Two templates in ONE theme?
« Reply #1 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'.
Logged

photo2pictures

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 7
    • PHOTO2PICTURES
Re: Two templates in ONE theme?
« Reply #2 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.
Logged
Have expertise in HTML and CSS, but PHP is still a bit unclear for me...

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Two templates in ONE theme?
« Reply #3 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.
Logged
Pages: [1]   Go Up
 

Page created in 0.021 seconds with 20 queries.