2.9RC1 Theme Config Question
I installed 2.9RC1 this morning and want to make sure I'm understanding the concept of Themes correctly.
When creating/editing a new theme, I see Configuration options for "Folders", "Templates", and "Screenshot". Screenshot, aside, to where should I be pointing the Folders and Templates directories?
Typically when I'm creating a site, I will create a themeName/ directory under /tl_files, which in turn contains directories for css/, js/, img/, etc. Is my assumption correct that Folders should point to /tl_files/themeName/?
Likewise, I'm assuming I should create something like /templates/themeName and point the Templates option to this new directory.
Thanks!
Re: 2.9RC1 Theme Config Question
Quote:
Originally Posted by markhurd
Typically when I'm creating a site, I will create a themeName/ directory under /tl_files, which in turn contains directories for css/, js/, img/, etc. Is my assumption correct that Folders should point to /tl_files/themeName/?
Likewise, I'm assuming I should create something like /templates/themeName and point the Templates option to this new directory.
Yes, you can create the folder /tl_files/themeName/ and the folder /templates/themeName
I suggest everyone to create a folder /tl_files/themes and put into the various themes
It could be the standard configuration?
Re: 2.9RC1 Theme Config Question
So a directory structure like this?
tl_files
-themes
--theme1
--theme2
--theme3
sounds good to me.
Re: 2.9RC1 Theme Config Question
Quote:
Originally Posted by Ben_360fusion
So a directory structure like this?
tl_files
-themes
--theme1
--theme2
--theme3
Yes, this structure.
This structure may be common to all people?
Re: 2.9RC1 Theme Config Question
Yeah, I will start doing that on projects going forward too. 99% of sites will probably just have 1, but no reason not to do this for consistency.
Re: 2.9RC1 Theme Config Question
Quote:
Originally Posted by markhurd
Yeah, I will start doing that on projects going forward too. 99% of sites will probably just have 1, but no reason not to do this for consistency.
This may be useful to make available free themes
Re: 2.9RC1 Theme Config Question
Just want to say something about commercial websites.
If you make websites in Contao like me - not using the built-in CSS framework, but including stylesheets directly in fe_ template (and so layout images) - that's a bad idea to leave all themes in tl_files folder. Why? Because a client has access to the layout files. He can accidentally remove something or move it to another directory and break the layout.
And here's my solution for this:
Before I start making a website, I create a new folder /layout. Then, I go to Contao settings and change the "Files directory" to /layout. This gives me a good environment to work.
When I finish the work, I simply change that setting back to /tl_files. This makes client doesn't grant an access to layout files so he can't break the appearance of the website, but grants an access to the folder where he can upload pictures etc.
You can see that on e.g. http://fc-niedergoesgen.ch/ in source code there's a stylesheet included from /layout/style.css
Btw, I wanted to write about themes in Contao on my blog, but I see it doesn't need any explanation how to organize folder structure etc. So apologies if someone expected a post about it ;)
Re: 2.9RC1 Theme Config Question
Quote:
Originally Posted by Tru
And here's my solution for this:
Before I start making a website, I create a new folder /layout. Then, I go to Contao settings and change the "Files directory" to /layout. This gives me a good environment to work.
When I finish the work, I simply change that setting back to /tl_files. This makes client doesn't grant an access to layout files so he can't break the appearance of the website, but grants an access to the folder where he can upload pictures etc.
This is an interesting suggestion, thanks, but it is possible to limit the folders that the user sees.
In my commercial websites the client not is administrator and not see all the tl_files folder
The standard for the layout can be useful for issues to be distributed.
All users know that the theme files are stored in tl_files/themes
Re: 2.9RC1 Theme Config Question
I actually do the exact opposite - I create a directory "uploads" within tl_files and then set their user group's filemount to this new directory. It lets me keep tl_files as the default, without giving them access to anything that could break.