Results 1 to 9 of 9

Thread: 2.9RC1 Theme Config Question

  1. #1
    User
    Join Date
    10-05-09.
    Location
    Dallas, TX, US
    Posts
    70

    Default 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!

  2. #2
    User PaoloB's Avatar
    Join Date
    06-19-09.
    Location
    Italy
    Posts
    238

    Default 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?
    Paolo B.
    Contao ambassador
    ContaoCms.it - Sito di riferimento per la comunità italiana

  3. #3
    User
    Join Date
    06-20-09.
    Location
    Middlesbrough, UK
    Posts
    246

    Default Re: 2.9RC1 Theme Config Question

    So a directory structure like this?

    tl_files
    -themes
    --theme1
    --theme2
    --theme3

    sounds good to me.
    360fusion: Virtual Tours - Web Design
    Social Media: Twitter - Facebook Page

  4. #4
    User PaoloB's Avatar
    Join Date
    06-19-09.
    Location
    Italy
    Posts
    238

    Default 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?
    Paolo B.
    Contao ambassador
    ContaoCms.it - Sito di riferimento per la comunità italiana

  5. #5
    User
    Join Date
    10-05-09.
    Location
    Dallas, TX, US
    Posts
    70

    Default 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.

  6. #6
    User PaoloB's Avatar
    Join Date
    06-19-09.
    Location
    Italy
    Posts
    238

    Default 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
    Paolo B.
    Contao ambassador
    ContaoCms.it - Sito di riferimento per la comunità italiana

  7. #7
    User
    Join Date
    07-26-09.
    Posts
    175

    Default 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

  8. #8
    User PaoloB's Avatar
    Join Date
    06-19-09.
    Location
    Italy
    Posts
    238

    Default 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
    Paolo B.
    Contao ambassador
    ContaoCms.it - Sito di riferimento per la comunità italiana

  9. #9
    User
    Join Date
    10-05-09.
    Location
    Dallas, TX, US
    Posts
    70

    Default 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.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •