rejetto forum

Software => HFS ~ HTTP File Server => HTML & templates => Topic started by: mudputty on February 10, 2010, 10:55:39 PM

Title: CSS based on folder name?
Post by: mudputty on February 10, 2010, 10:55:39 PM
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 (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?
Title: Re: CSS based on folder name?
Post by: rejetto on February 11, 2010, 09:44:29 AM
yes, it's possible, and quite easy.
first question: what template you mean to use for this? the default one?
Title: Re: CSS based on folder name?
Post by: mudputty on February 12, 2010, 06:54:01 PM
Yes, the default one. I gota learn it as simple as possible first :)
Title: Re: CSS based on folder name?
Post by: rejetto on February 12, 2010, 07:01:34 PM
right click on the folder "photos" > properties > diff template
and put this text

[+style.css|no log]
body { background:red }
Title: Re: CSS based on folder name?
Post by: mudputty on February 12, 2010, 07:09:17 PM
Well, smother me in cheese and call me a cheese-it, I had no idea about that option. Nice! Thanks for the tip.