17488 Posts in 4473 Topics by 1978 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 1677 Views |
-
template sistem

31 October 2008 at 12:01am
Hi!
I have one question about template system. Do I have option to create different graphical interface for each of menu category?
... like this:
- home have two columns in red and blue colors
- about-us have two columns and two rows with black and white colors
- ,...Thank for help
Goran -
Re: template sistem

31 October 2008 at 7:01am Last edited: 31 October 2008 7:02am
Yes. If I've understood you correctly, for different pages to have different templates, you either:
* create new page types (eg extend Page) and make new template files with the same name or,
* use 'renderWith' to apply different templates to the same page class. -
Re: template sistem

31 October 2008 at 3:38pm
Or you can do something like this in your page.ss template
<body id="$URLSegment">
So that will output like body id="home and body id="about-us" then in your CSS you could do #home #blah {} , #about-us #blah {} to swap layouts
-
Re: template sistem

2 November 2008 at 2:11am Last edited: 2 November 2008 3:56am
Hi!
I try to add this code but this sistem doesn't work.
(On domain http://www.modnidodatki.com)
I need something like:
- predstavitev using: Sunflower theme
- modni dodatki za žene using: hairdresser
- modni dodatki za moške using: GoldShire
- ,...
or someting less complicated
I have one theme, but each of menu (pages and subpages) using one theme, but diferent html codep.s. Sorry for my english ;-(
-
Re: template sistem

3 November 2008 at 11:33am
So you want different themes for different sections? if they are completely different themes you need to set a line - SSViewer::set_theme('themename'); What you might have to do is have a switch statement in your Page.php Controller in the init() function which does something like
switch($this->URLSegment) {
case 'home' :
SSViewer::set_theme('theme1');
break;case 'otherpage':
SSViewer::set_theme('theme2');
break;
}
| 1677 Views | ||
|
Page:
1
|
Go to Top |



