rejetto forum

CSS based on folder name?

0 Members and 1 Guest are viewing this topic.

Offline mudputty

  • Occasional poster
  • *
    • Posts: 12
    • View Profile
    • Tridell Utah
Is it possible to create the layout based on the directory name that you are in? The post over at "http://www.rejetto.com/forum/index.php/topic,8168.msg1048417.html#msg1048417" got me thinking about having a directory called "Photos", and based on that name, change the layout according to a different CSS file. I was thinking that it would be nice to do something similar with a directory called "Videos" and "Music" as well. Each layout based on the directory's name so that I can tailor the layouts accordingly.

Is such a thing possible? If so then does anyone have any tips and/or examples to help me get started on it?


Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13510
    • View Profile
yes, it's possible, and quite easy.
first question: what template you mean to use for this? the default one?


Offline mudputty

  • Occasional poster
  • *
    • Posts: 12
    • View Profile
    • Tridell Utah
Yes, the default one. I gota learn it as simple as possible first :)


Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13510
    • View Profile
right click on the folder "photos" > properties > diff template
and put this text

[+style.css|no log]
body { background:red }


Offline mudputty

  • Occasional poster
  • *
    • Posts: 12
    • View Profile
    • Tridell Utah
Well, smother me in cheese and call me a cheese-it, I had no idea about that option. Nice! Thanks for the tip.