0
Welcome Guest! Login
0 items Join Now

Module overrides in Gantry

    • Ali Samii's Avatar
    • Ali Samii
    • Elite Rocketeer
    • Posts: 629
    • Thanks: 2

    Module overrides in Gantry

    Posted 12 years 3 months ago
    • I'm a bit confused on how module overrides work in Gantry 4.

      I am attempting to implement some modifications to the RokGallery CSS. I have created a folder called "overrides" within my Gantry-based template and copied the directory structure of modules/mod_rokgallery/templates into that folder as templates/mytemplate/overrides/mod_rokgallery/templates. This is the same structure as can be found in the Cerulean template.

      I implemented the changes I want in the CSS files, but that made no difference.

      I then created a file called rokgallery-style.less in templates/mytemplate/less and added my CSS to that.

      I can see the CSS compiling properly as it shows up in my master-checksum.css file. However, the default styles in modules/mod_rokgallery/templates override the custom styles.

      I added the !important flag to a style, cleared the cache and reloaded, but the default styles still cancel out my custom styles.

      How do I properly set up module overrides in Gantry 4?

      gobet.ergonomiq.net/face-à-la-crise
      J3.0.2
      G4.1.4
      Default Template, modified

      Thanks,
    • Thank you.

      Ali Samii
    • Henning's Avatar
    • Henning
    • Preeminent Rocketeer
    • Posts: 29362
    • Thanks: 954
    • Volunteer

    Re: Module overrides in Gantry

    Posted 12 years 1 month ago
    • try to do your overrides in the html folder of the template ...
    • Ali Samii's Avatar
    • Ali Samii
    • Elite Rocketeer
    • Posts: 629
    • Thanks: 2

    Re: Module overrides in Gantry

    Posted 12 years 1 month ago
    • Hi Henning,

      Thanks for your reply, but placing the mod_rokgallery folder inside the html folder makes no difference.

      The template still loads the css from the site_root/modules/mod_rokgallery hierarchy.

      This is the structure of the folder I have copied into the html hierarchy. I haven't made any changes yet other than a small cosmetic change to the css just to see if it loads...it doesn't...and the web inspector still indicates that the site_root/modules hierarchy is loading...so the override isn't taking hold.
      html
      ├── mod_login
      │   ├── default.php
      │   └── index.html
      ├── mod_rokgallery
      │   ├── index.html
      │   └── templates
      │        ├── grid
      │        │   ├── dark
      │        │   │   ├── index.html
      │        │   │   └── style.css
      │        │   ├── default.php
      │        │   ├── grid.css
      │        │   ├── index.html
      │        │   └── light
      │        │        ├── index.html
      │        │        └── style.css
      │        ├── index.html
      │        ├── showcase
      │        │   ├── dark
      │        │   │   ├── images
      │        │   │   │   ├── index.html
      │        │   │   │   └── showcase-arrows.png
      │        │   │   ├── index.html
      │        │   │   └── style.css
      │        │   ├── default.php
      │        │   ├── index.html
      │        │   ├── javascript.php
      │        │   ├── joomla
      │        │   │   └── 2.5
      │        │   │        └── showcase.js
      │        │   ├── light
      │        │   │   ├── images
      │        │   │   │   ├── index.html
      │        │   │   │   └── showcase-arrows.png
      │        │   │   ├── index.html
      │        │   │   └── style.css
      │        │   ├── showcase.css
      │        │   └── showcase.js
      │        ├── showcase_responsive
      │        │   ├── dark
      │        │   │   ├── images
      │        │   │   │   ├── index.html
      │        │   │   │   └── showcase-arrows.png
      │        │   │   ├── index.html
      │        │   │   └── style.css
      │        │   ├── default.php
      │        │   ├── index.html
      │        │   ├── javascript.php
      │        │   ├── joomla
      │        │   │   └── 2.5
      │        │   │        └── showcase_responsive.js
      │        │   ├── light
      │        │   │   ├── images
      │        │   │   │   ├── index.html
      │        │   │   │   └── showcase-arrows.png
      │        │   │   ├── index.html
      │        │   │   └── style.css
      │        │   ├── showcase_responsive.css
      │        │   └── showcase_responsive.js
      │        └── slideshow
      │             ├── dark
      │             │   ├── images
      │             │   │   ├── divider.png
      │             │   │   ├── index.html
      │             │   │   └── slideshow-arrows.png
      │             │   ├── index.html
      │             │   └── style.css
      │             ├── default.php
      │             ├── index.html
      │             ├── javascript.php
      │             ├── joomla
      │             │   └── 2.5
      │             │        └── slideshow.js
      │             ├── light
      │             │   ├── images
      │             │   │   ├── divider.png
      │             │   │   ├── index.html
      │             │   │   └── slideshow-arrows.png
      │             │   ├── index.html
      │             │   └── style.css
      │             ├── slideshow.css
      │             └── slideshow.js

      The site is local on my machine right now, but I could upload it to a server if that helps.
    • Thank you.

      Ali Samii
    • Henning's Avatar
    • Henning
    • Preeminent Rocketeer
    • Posts: 29362
    • Thanks: 954
    • Volunteer

    Re: Module overrides in Gantry

    Posted 12 years 1 month ago
    • what do you want to change exactly?
    • Ali Samii's Avatar
    • Ali Samii
    • Elite Rocketeer
    • Posts: 629
    • Thanks: 2

    Re: Module overrides in Gantry

    Posted 12 years 1 month ago
    • Lots of things...layout, functionality, and I want to keep the CSS/LESS isolated from the rest of the CSS...that is, I don't want to mix it into the template.less or template-custom.less. This is especially important as I will need to make modifications to the default.php files and change layout considerations in each of the various styles/variations.

      The site will have slideshows, grid layouts, showcases, responsive showcases, and then also RokSprocket layouts too.

      What I want to make sure I get working is a way to implement overrides for modules and components easily, in a structured and methodical way. This is one of the beauties of Gantry's structure, in that it allows granular control while remaining fully upgradeable. However, I cannot seem to get RokGallery customisation to work.
    • Thank you.

      Ali Samii
    • Ali Samii's Avatar
    • Ali Samii
    • Elite Rocketeer
    • Posts: 629
    • Thanks: 2

    Re: Module overrides in Gantry

    Posted 12 years 1 month ago
    • Henning, do you have any advice on how I can get Gantry to actually load my overrides for RokGallery? It really is something that I need to have available.

      Thanks,
    • Thank you.

      Ali Samii
    • Henning's Avatar
    • Henning
    • Preeminent Rocketeer
    • Posts: 29362
    • Thanks: 954
    • Volunteer

    Re: Module overrides in Gantry

    Posted 12 years 1 month ago
    • Well you can load a less file by just adding a single line in the index.php or just write a feature to load less (just as you were used to load custom css in Gantry 3) or just add a line to the global.less.

      Overriding the html output for RokGallery is a different thing as it's different from the normal overriding stuff.
      I wasn't able to do that myself. I asked some devs some time ago but haven't heard anything.
    • Ali Samii's Avatar
    • Ali Samii
    • Elite Rocketeer
    • Posts: 629
    • Thanks: 2

    Re: Module overrides in Gantry

    Posted 12 years 1 month ago
    • Hi Henning:

      Thank you...I thought I was the only one with this problem...but if you have not been able to successfully override RokGallery, that makes me feel less (no pun intended) useless. I seem to have the same issue with RokSprocket, and I am guessing, since both rely on the "rokcommon" it has something to do with that.

      It is strange, however, that even trying to replicate the directory structure of one of the standard release templates of RocketTheme such as Cerulean where the template directory has a "roksprocket" directory under the template root, it still doesn't seem to take hold.

      Perhaps you can try to contact Brian Towles or Djamil Legato who's names are in the PHP copyright information of RokGallery and RokSprocket files and ask again.
    • Thank you.

      Ali Samii

Time to create page: 0.084 seconds