0
Welcome Guest! Login
0 items Join Now

Unable to add a custom box variation

  • Unable to add a custom box variation

    Posted 6 years 1 month ago
    • I want to add a «variation». I have added the folder «gantry» in «custom» folder and added the «theme.yaml» file with the box variation named «box-myyellow». However the item does not appear in the list.

      However, when I add it directly to the «theme.yaml» file inside the «gantry» folder of the template I see it. Doesn't the override work?
    • MrT's Avatar
    • MrT
    • Preeminent Rocketeer
    • Posts: 101084
    • Thanks: 13481
    • Web Designer/Developer

    Re: Unable to add a custom box variation

    Posted 6 years 1 month ago
    • If you want to create a new block variation then you should do that in a custom CSS file. Do not change our original template files.

      To create a custom CSS compatible with Gantry 5 please read this http://docs.gantry.org/gantry5/tutorials/adding-a-custom-style-sheet .

      Remember to recompile CSS from base outline too.

      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: Unable to add a custom box variation

    Posted 6 years 1 month ago
    • Thanks for a quick reply. But will it appear in the dropdown list of variations then?
      Under engine files it says you can override «gantry» folder. I thought I needed to add it.
      docs.gantry.org/gantry5/advanced/customizing-theme-files

      Could you show an example of how you would add a new «box-variation»?
    • MrT's Avatar
    • MrT
    • Preeminent Rocketeer
    • Posts: 101084
    • Thanks: 13481
    • Web Designer/Developer

    Re: Unable to add a custom box variation

    Posted 6 years 1 month ago
    • Ok let me ask you some questions first...

      Are you a template developer?
      Why do you want to add them to the dropdown? If it's only you using site it will be a waste of time.
      You don't have to use the "block variations" field to use your own class - you can just use the "CSS Class" field instead. So why can't you use that? (e.g. you could add a "box-by-me" CSS Class and then just put the definition of "box-by-me" in your custom.scss.
      If you create an override, then you're going to have to maintain it as and when new releases of the template and/or gantry are released - why do you want to give yourself this extra headache? Why is the dropdown so important to you and does the benefit outweigh this?

      If you can answer the above... I will help you to get what you want to do...

      Please would you post your URL, superuser id and pswd in the secure tab of your post and I'll have a look for you. Also, Please post your FTP logon, password and FTP URL in the secure area of your post.


      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: Unable to add a custom box variation

    Posted 6 years 1 month ago
    • That is true, no not a template developer. I thought there was an easy way of doing it (and that it was the way to go) but I see what you mean by using CSS. So those fields are only used by template developers then for convenience? And not ment to be added/altered?
    • MrT's Avatar
    • MrT
    • Preeminent Rocketeer
    • Posts: 101084
    • Thanks: 13481
    • Web Designer/Developer

    Re: Unable to add a custom box variation

    Posted 6 years 1 month ago
    • My point is that you need to understand the implications of going down that route and accept the extra workload that you will give yourself. So, whilst technically valid, you really only want to do that if you are a template developer who's going to sell the template, or have a lot of admin users that you want to be able to configure your site in the backend. If it's only you that would use this then the work involved and implications are really not worth it and I advise you to use custom CSS instead.

      Regards, Mark.
    • Last Edit: 6 years 1 month ago by MrT.
    • 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.057 seconds