0
Welcome Guest! Login
0 items Join Now

SOLVED Add a custom css file to a template override

    • Denis's Avatar
    • Denis
    • Newbie
    • Posts: 12
    • Thanks: 0

    Re: SOLVED Add a custom css file to a template override

    Posted 8 years 9 months ago
    • cdavis411, thank you very much. It works!
    • cdavis411's Avatar
    • cdavis411
    • Preeminent Rocketeer
    • Posts: 17787
    • Thanks: 882

    Re: SOLVED Add a custom css file to a template override

    Posted 8 years 9 months ago
    • Denis wrote:
      cdavis411, thank you very much. It works!
      Glad to be of service. See you around the board
    • Dkvman's Avatar
    • Dkvman
    • Hero Rocketeer
    • Posts: 390
    • Thanks: 0

    Re: SOLVED Add a custom css file to a template override

    Posted 8 years 2 months ago
    • I have a simple question.
      I made an override template called nomenu2
      I created a css page in /templates/rt_anacron/css/ and called it nomenu2-custom.css

      I made some obvious changes to verify it was in use first.
      I dont see those changes in the browser.
      I dont see the new csss file in inspect an element it only shows the original custom override page in this path templates/rt_homescholar/css/ called rt_homescholar-custom.css
      Site link is in secure tab
      Did I name it wrong or put it in the wrong folder?
    • Henning's Avatar
    • Henning
    • Preeminent Rocketeer
    • Posts: 29362
    • Thanks: 954
    • Volunteer

    Re: SOLVED Add a custom css file to a template override

    Posted 8 years 2 months ago
    • Adding custom css files doesnt work like that.
      The name of the css file is based on the name of the template folder + "-custom".
      It is not based on the name of the gantry override.

      I suggest to use the page-suffix-feature of Gantry and to add those taylored css-rules to your custom css file that already works.
    • Dkvman's Avatar
    • Dkvman
    • Hero Rocketeer
    • Posts: 390
    • Thanks: 0

    Re: SOLVED Add a custom css file to a template override

    Posted 8 years 2 months ago
    • Thanks I understand now.
      So you cant just start making new template overrides and then matching them to a custom css file in the same folder.

      Ok so I want to modify this css for my menu item

      #rt-logo {
      display: block;
      margin: 5px -92px 0px;
      }

      Your stating I should add a suffix like "mymenu" in the menu item under the "page display" tab in the field named "Page class"

      Then change the css in my /templates/rt_anacron/css/ folder for my file rt_anacron-custom.css to this?
      .mymenu #rt-logo {
      display: block;
      margin: 5px -92px 0px;
      }
    • Henning's Avatar
    • Henning
    • Preeminent Rocketeer
    • Posts: 29362
    • Thanks: 954
    • Volunteer

    Re: SOLVED Add a custom css file to a template override

    Posted 8 years 2 months ago
    • Enable the page-suffix-feature for that in Gantry 4. Add a page class and inspect the body of the rendered html code to find the right name of the class.
  • Re: SOLVED Add a custom css file to a template override

    Posted 8 years 2 months ago
    • I am having some trouble with a template RT_XENON running on gantry 5. Can you guide me on what I need to do? What you are talking about is Gantry 4 and things seem to have changed.
    • Dkvman's Avatar
    • Dkvman
    • Hero Rocketeer
    • Posts: 390
    • Thanks: 0

    Re: SOLVED Add a custom css file to a template override

    Posted 8 years 2 months ago
    • My code worked perfectly thanks for the help and the steps Henning
    • Henning's Avatar
    • Henning
    • Preeminent Rocketeer
    • Posts: 29362
    • Thanks: 954
    • Volunteer

    Re: SOLVED Add a custom css file to a template override

    Posted 8 years 2 months ago

Time to create page: 0.057 seconds