Forums / Cotonti / Support / Apply another skin for sub-category

12>>>

booka
#1 2010-04-23 21:13
Hello!

I have next question. Last year we used another template and skin for our site (depend on sponsors, main artist etc). This year it will be another template (currently using on www.bestfest.ru).
Is it possible to save old skin for 2009 pages (artists, schedule etc)?
booka
Kort Online
#2 2010-04-23 22:07
Technically, you can use xtemplate IF-block to load a corresponding stylesheet
SED.by - создание сайтов, разработка плагинов и тем для Котонти
booka
#3 2010-04-24 01:32
What is that - IF-block? )))

It will require hack? ))) Don't like them...
booka
urlkiller
#4 2010-04-24 08:51
with cotonti you can use logical if blocks when styling templates.
somwhere in the forums and docu should be a word about it.

the easiest way would be to just copy the old skin from the skins direcotry and save it on your hdd or somewhere else. implement the new one and do the same next year...

other than that you could use different sub styles for every skin. (some dark and white css style for example)

this style can be choosen in the users profile or can be set directly with a mysql query...
URL shortener: <a href="http://bbm.li/!7AD5C7">http://bbm.li/!7AD5C7</a>
booka
#5 2010-04-24 16:39
In the structure options we have a set-up to determine template for sub-cat (from parent, by default etc). I though is it possible to change code and determine skins there. Actually in case it is not possible to do that, I though about header(main, footer).somecategory.tpl's....

Добавлено 2 Минуты спустя:

for example.. this year we will have a list if artists and '10 skin by default to whole site...
few pages I'll move to '09 subcat (old welcome page, old list of artists, old artists pages)... So the idea is to apply old skin to that subcategory
booka
urlkiller
#6 2010-04-25 10:53
yeah i guess i understand your problem i had the same you wish to see some

header.<category>.tpl
footer.<category>.tpl
index.<category>.tpl

i wish there would be something like that too...

a possible solution would be solving this with a plugin. i guess...

any more ideas from the forums?

maybe you should read yourself in that logical block thing with the xtemplate engine.
then you could have severeal different stylesheets (no different templates!!!) and just switch background images, colors etc. with the css file. maybe the way of less resistance
URL shortener: <a href="http://bbm.li/!7AD5C7">http://bbm.li/!7AD5C7</a>
Kort Online
#7 2010-04-25 14:42
Switching complete skins for specific pages makes little sense, for a skin is set of template files covering whole website. Switching css-files would be enough. Another solution would be creating categories like 2008, 2009, 2010, moving the pages there & using tpl-files as suggested above.
SED.by - создание сайтов, разработка плагинов и тем для Котонти
Trustmaster
#8 2010-04-25 19:59
# urlkiller : yeah i guess i understand your problem i had the same you wish to see some

header.<category>.tpl
footer.<category>.tpl
index.<category>.tpl

i wish there would be something like that too...
Custom header/footer templates for categories have existed in Cotonti for ages:
$cfg['enablecustomhf'] = true;
May the Source be with you!
booka
#9 2010-04-25 21:55
I had though about that, but is it possible to use page.<cat>.tpl, list.<cat>.tpl?
booka
Trustmaster
#10 2010-04-25 22:20
Why not? As far as I remember this feature has been present since Seditio...
May the Source be with you!
tensh
#11 2010-04-26 16:26
There was a plugin 'category CSS' somewhere as well...
booka
#12 2010-05-02 00:17
header.<category>.tpl - is working by code of category?
booka
Kort Online
#13 2010-05-02 00:37
no
SED.by - создание сайтов, разработка плагинов и тем для Котонти
booka
#14 2010-05-02 01:33
How to made it work?
booka
pieter
#15 2010-05-02 01:43
Plugin for specific CSS: http://www.neocrome.net/page.php?id=2278

header.<category>.tpl does not work.
you can make a header.page.tpl, but this not help you.

When trying to load a template file to display the HTML output, under some conditions Seditio/Cotonti will try to load an optional layout. This page sum up the possible names for those optional skin files.

As sample, the line "page.CAT.tpl" means that when trying to display a page (page.php?id=...) that belongs to a category "sports", the engine will first try to use a file page.sports.tpl, and if not found it will go for the default page.tpl

list.CAT.tpl
list.group.CAT.tpl
page.CAT.tpl
page.add.CAT.tpl
page.edit.CAT.tpl
forums.posts.FCAT.FORUM_ID.tpl
forums.topics.FCAT.FORUM_ID.tpl
forums.editpost.FCAT.FORUM_ID.tpl
forums.newtopic.FCAT.FORUM_ID.tpl
users.banned.tpl
users.inactive.tpl
skins/SKIN/plugin.standalone.PLUG.tpl
skins/SKIN/SKIN.LANG.lang.php

---------------

CAT = Category code (string)
CAT = Forum category code (string)
FORUM_ID = Forum (number)
SKIN = Skin code (string)
LANG = Language code (string)
PLUG = Plugin code (string)
... can we help you ...

12>>>