0
Welcome Guest! Login
0 items Join Now

Create layout 1020px fixed width

  • Create layout 1020px fixed width

    Posted 11 years 4 months ago
    • I need to have a fixed template width of 1020px instead to use one of the default size provided in Gantry such 960px or 1200px. For do that I modified the original 1200fixed.less file and I changed related value with this one:
      width: 85px;
                     }
                     .rt-grid-2 {
                          width: 170px;
                     }
                     .rt-grid-3 {
                          width: 255px;
                     }
                     .rt-grid-4 {
                          width: 340px;
                     }
                     .rt-grid-5 {
                          width: 425px;
                     }
                     .rt-grid-6 {
                          width: 510px;
                     }
                     .rt-grid-7 {
                          width: 595px;
                     }
                     .rt-grid-8 {
                          width: 680px;
                     }
                     .rt-grid-9 {
                          width: 765px;
                     }
                     .rt-grid-10 {
                          width: 850px;
                     }
                     .rt-grid-11 {
                          width: 935px;
                     }
                     .rt-grid-12 {
                          width: 1020px;


      Then by selecting 1200FIXED Layout Mode in Gantry settings, I get well a fixed 1020px size. Now I seen on Gantry Docs is also possible to create a custom LESS file. So I'm supposed to create a 1200fixed-custom.less file with my modified code and keep the original 1200fixed.less file ???

      My goal is to be sure my custom CSS and LESS file will never be overwritten and never be cached.

      Please clarify in details...

      thank
    • MrT's Avatar
    • MrT
    • Preeminent Rocketeer
    • Posts: 101084
    • Thanks: 13484
    • Web Designer/Developer

    Re: Create layout 1020px fixed width

    Posted 11 years 4 months ago
    • yes that's right - why wouldn't you want the file cached? that file goes throughout the LESS compiler and get converted to CSS - which then get's cached?

      Regards, Mark.
    • Please search forums before posting. Please make sure your post includes the version of the CMS you are using and a link to the problem. Annotations on screenshots can also be helpful to explain problems/goals. Please use the "secure" tab for confidential information.
  • Re: Create layout 1020px fixed width

    Posted 11 years 3 months ago
    • Ok thank for confirmation...

      About cache my only goal was to be sure if I modify my custom css template file (in my case I use afterburner2) to immediately reflect the change at user side. If I'm not wrong, custom file are not compiled (that the point I did not well understand with RT template) reason why I thought to disallow my custom file to be cached.

      any clue ?

      I precise I don't have Joomla cache enabled. What I meant was only related to user browser cache and nothing else. Now if you tell me Gantry is able to detect any change made in custom file and force user browser to fetch the new/modified file instead to use the one cached so no problem.
    • MrT's Avatar
    • MrT
    • Preeminent Rocketeer
    • Posts: 101084
    • Thanks: 13484
    • Web Designer/Developer

    Re: Create layout 1020px fixed width

    Posted 11 years 3 months ago
    • Whenever you make changes in the backend of your site your should be clearing server cache to make sure that you see all those changes. If you are making changes in front-end I suggest you consider using CacheCleaner from NoNumber which will enable you to add a button on the front-end to do the same thing as well as adding cache cleaning features to backend.

      To stop browser caching your site (which is not a good idea since this will slow your site down to end users) then you can add a short "expires" header to your .htaccess file (google this).

      In short, caching is done for a reason - to speed up your site.

      Regards, Mark.
    • Please search forums before posting. Please make sure your post includes the version of the CMS you are using and a link to the problem. Annotations on screenshots can also be helpful to explain problems/goals. Please use the "secure" tab for confidential information.
  • Re: Create layout 1020px fixed width

    Posted 11 years 3 months ago
    • To stop browser caching your site (which is not a good idea since this will slow your site down to end users) then you can add a short "expires" header to your .htaccess file (google this).
      Yes I looked about this technique but it seem this work for resource type only (such for example all .gif image or all .css file) of the whole site or which are located in a specific directory. But what about if I want set a short expiry (such 1 hours) for "rt_afterburner2-custom.css" located on mysite.com/templates/rt_afterburner2/css/ and where others file which do not required a short expiry are also present ??

      Too bad RT do not handle this kind of case. Any more suggestions?

      In short, caching is done for a reason - to speed up your site.
      Yes but my site target a local audience and my server is located at less than 200km of where this audience live. Furthermore a big majority of this audience are well connected with high internet speed connection. So I consider that's more important to be sure my custom css (which actually contain and will contain in future various display:none class) will be used quickly after his modification instead to try to gain some more speed (few milliseconds?) or little better SEO optimization for a file of 10ko size.
    • MrT's Avatar
    • MrT
    • Preeminent Rocketeer
    • Posts: 101084
    • Thanks: 13484
    • Web Designer/Developer

    Re: Create layout 1020px fixed width

    Posted 11 years 3 months ago
    • Ok well the questions you are asking are nothing to do with RT templates, At best they are related to joomla and in reality are more about general server setup and general html/css. If you google a bit more you will find various methods of stopping a browser caching things, generally (for a page) it's straight forward but for a specific file it's more difficult - but there are solutions if you research further.

      Regards, Mark.
    • Please search forums before posting. Please make sure your post includes the version of the CMS you are using and a link to the problem. Annotations on screenshots can also be helpful to explain problems/goals. Please use the "secure" tab for confidential information.

Time to create page: 0.064 seconds