RJGallery

Create a photo gallery with full screen preview and slideshow

Back to RJGallery Support

anastazius
anastazius

I have default setting of Gallery slug component used on CMS page http://joxi.ru/VrwbQ79hO51gLA Gallery slug - :slug What does that mean - i'm supposed to get a gallery with same slug as the current page? Nothing happens. If the slug is hardcoded like 'arhiv' - I can see the gallery. How this :slug parameter should work? Please help.

anastazius
anastazius

I've got it. This component is for blog posts, to output a featured gallery on a blog post page. To output a gallery with the same slug as the page I did:

use Raviraj\Rjgallery\Models\Gallery as Galleries; function onStart(){ $slug = str_replace('/','',$this->page->url); $this['banners'] = Galleries::where('slug', $slug)->first()->images->toArray(); } (I need only images, I don't use plugin's jquery or styles)

Greg
RempadDesign
RempadDesign

anastazius said:

I've got it. This component is for blog posts, to output a featured gallery on a blog post page. To output a gallery with the same slug as the page I did:

use Raviraj\Rjgallery\Models\Gallery as Galleries; function onStart(){ $slug = str_replace('/','',$this->page->url); $this['banners'] = Galleries::where('slug', $slug)->first()->images->toArray(); } (I need only images, I don't use plugin's jquery or styles)

Where have you inserted this code exactly? Please be more explicit. Thank you in advance.

1-4 of 4