0
Welcome Guest! Login
0 items Join Now

SOLVED image gallery in grav content

    • beamaria's Avatar
    • beamaria
    • Elite Rocketeer
    • Posts: 513
    • Thanks: 6

    SOLVED image gallery in grav content

    Posted 4 years 2 months ago
    • Hi all!
      I'm learning the use of Gantry 5 (which I already know well and use in all my Joomla sites) in conjunction with GRAV. My theme is Helium (to have some working example I installed the grav-gantry Helium skeleton). It's not clear to me how I can add an "image gallery" particle inside the grav content- In joomla I can do this using a module and calling it with the correct syntax inside the article,but in GRAV??
      Thanks for your help!
    • MrT's Avatar
    • MrT
    • Preeminent Rocketeer
    • Posts: 101084
    • Thanks: 13481
    • Web Designer/Developer

    Re: SOLVED image gallery in grav content

    Posted 4 years 2 months ago
    • Helium for GRAV only come with the owlcarousel particle and that particle does not support CMS sourced content. If you want that then you would need to purchase one of the RT templates that does provided SOME particles that are able to source their content from the CMS.

      If you are happy to use just particle content the you can use the owlcarousel particle.

      As far as using the particle then you just put the particle on the layout of your outline (as you would in Joomla). There are no softcodes to emebed particles with GRAV page content.

      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.
    • beamaria's Avatar
    • beamaria
    • Elite Rocketeer
    • Posts: 513
    • Thanks: 6

    Re: SOLVED image gallery in grav content

    Posted 4 years 2 months ago
    • Hi Mark, yesterday I found a shortcode for the owl carousel among the plugins of GRAV. I installed and copied/pasted this code in a blog post, but apparently it doesn't work.

      [owl-carousel items=1 margin=10 loop=true autoplay=true autoplayHoverPause=true nav=true]
      ![](myimage1.jpg)
      ![](myimage2.jpg)
      ![](myimage3.jpg)
      [/owl-carousel]

      So I must assume that there is no way to add a gallery/carousel in a post, just before the next/previous post buttons? The fact is if I add a row below the Grav content particle and insert a owl-carousel particle in it, the carousel is out the post...
    • MrT's Avatar
    • MrT
    • Preeminent Rocketeer
    • Posts: 101084
    • Thanks: 13481
    • Web Designer/Developer

    Re: SOLVED image gallery in grav content

    Posted 4 years 2 months ago
    • I am not sure that's what you think it is. It's a way of putting an owlcarousel into a page sure, but it's nothing to do with the Gantry 5 owlcarousel particle. That plugin is really intended for pure GRAV sites (not those using Gantry 5). As I said, you cannot use a shortcode for Gantry 5 particles to place them in page content.

      When you are using Gantry 5 it's really the other way around, you construct you page content in the outlines (which can be GRAV content too). The owlcarousel particle should be placed on the layout of the outline that you are using.

      Regards, Mark.
    • The following users have thanked you: beamaria

    • 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.
    • beamaria's Avatar
    • beamaria
    • Elite Rocketeer
    • Posts: 513
    • Thanks: 6

    Re: SOLVED image gallery in grav content

    Posted 4 years 2 months ago
    • Ok, after a lot of search, I've found I have to modify this file: /user/plugins/shortcode-owl-carousel/templates/partialsowl-carousel.html.twig using this code:

      <div class="owl-carousel owl-theme" id="{{ owl_id }}">
          {{ owl_items|regex_replace('(^\n?<p>|<\/p>$)','') |raw }}
      </div>

      Now the images are perfectly visible at the bottom of the post.

      The problem is that the plugin itself hasn't been updated with this modification, so when you install it from the admin manager you 're still installing the wrong version- It should be corrected by GRAV team ....
    • MrT's Avatar
    • MrT
    • Preeminent Rocketeer
    • Posts: 101084
    • Thanks: 13481
    • Web Designer/Developer

    Re: SOLVED image gallery in grav content

    Posted 4 years 2 months ago
    • Please can you raise a bug ticket here then https://github.com/getgrav/grav-plugin-shortcode-owl-carousel/issues .

      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.
    • beamaria's Avatar
    • beamaria
    • Elite Rocketeer
    • Posts: 513
    • Thanks: 6

    Re: SOLVED image gallery in grav content

    Posted 4 years 2 months ago
    • Will do!

Time to create page: 0.051 seconds