Info
Content

Page Properties

__SELF__.gallery
Type: ZenWare\NovemberGallery\Classes\Gallery
Gallery class, holds the various properties of the gallery instance.

Property Type Description
items October\Rain\Support\Collection Collection of gallery items, see below.
sortBy
string The GalleryItem property by which the gallery should be sorted (as set in the component inspector)
name  string Gallerz name (available for galleries created on the "Galleries" back-end page)
slug
string
Gallery slug (available for galleries created on the "Galleries" back-end page)
description
string
Gallery description (available for galleries created on the "Galleries" back-end page)
publishedAt
Carbon datetime
Gallery published on date (available for galleries created on the "Galleries" back-end page)
createdAt
Carbon datetime
Gallery created on date (available for galleries created on the "Galleries" back-end page)
updatedAt
Carbon datetime
Gallery updated on date (available for galleries created on the "Galleries" back-end page)
previewImage
System\Models\File
Gallery preview image (available for galleries created on the "Galleries" back-end page)
published
boolean
Gallery active (or not) (available for galleries created on the "Galleries" back-end page)

 

__SELF__.galleryitems
Type: October\Rain\Support\Collection
also see API DocsIlluminate\Database\Eloquent\Collection and Illuminate\Support\Collection

Collection of ZenWare\NovemberGallery\Classes\GalleryItem classes. Serving it as a collection gives access to a ton functionality that is not available with a simple array. For example, you could choose to sort the images by filename:

{% for galleryitem in customGallery.gallery.items.sortBy('fileName') %}
   <img src="{{ galleryitem.url }}" />
{% endfor %}

GalleryItem Properties

Property Type Description
title string Image title metadata, available for images uploaded using the backend gallery page only
description string Description metadata, available for images uploaded using the backend gallery page only
sortOrder string Image sort order, available for images uploaded using the backend gallery page only
file SplFileInfo A standard php file information object, only available for files uploaded using the Media Manager
octoberImageFile System\Models\File A standard php file information object, only available for files uploaded using the Media Manager
width integer Image width, see https://www.php.net/manual/en/function.getimagesize.php
height integer Image height, see https://www.php.net/manual/en/function.getimagesize.php
type string Image type, see https://www.php.net/manual/en/function.getimagesize.php
orientation string Will be "horizontal", "vertical", or "square" depending on whether the image is wider than it is tall
fileNameWithoutExtension string Base name of the file without extension, for example: picture-1
fileExtension string File extension, for example: jpg
fileName string Filename, for example: picture-1.jpg
filePath string Path without filename, for example: /var/www/mywebsite.com/public_html/storage/app/media/my-galleries/gallery-1
fileRealPath string Absolute path to file, for example: /var/www/mywebsite.com/public_html/storage/app/media/my-galleries/gallery-1/picture-1.jpg
fileSize string File size, in bytes, for example: 404779
relativeFilePath string Path to file relative to the website, for example: /storage/app/media/my-galleries/gallery-1/picture-1.jpg
uploaded string Last modified time for files uploaded using the Media Manager, or the upload time for files uploaded using the back-end gallery tab, you can then: $currentTime->format( 'c' );
url string URL to file, for example: https://www.mywebsite.com/storage/app/media/my-galleries/gallery-1/picture-1.jpg

 

Hint: To dig into the galleryItems (or any other) variable/collection, you have two options. You can simply add {{ dump(embeddedGallery.galleryitems.toArray) }} on your page after the component definition and it will print debug information about that variable straight in your page. Alternatively, you can install the Debugbar plugin and then add {{ debug(embeddedGallery.gallery.items) }} to your page to show debug information in the Laravel debugbar. Make sure to replace "embeddedGallery" with the alias of your component as set in the component options!

Additional Page Properties

__SELF__.defaultgalleryoptions
Type: string
Used in the embedded gallery default template, this holds any custom script options set for the component in the “Script Options” property, along with any generated options (for example: gallery_theme: "tiles", tiles_type: "justified")

__SELF__.defaultLightboxOptions
Type: string
Used in the lightbox gallery default template, this holds any custom script options set for the component in the “Script Options” property, along with the following: gallery_theme: "lightbox"

__SELF__.customgalleryscript
Type: string
The “Custom Gallery Script” set on the plugin backend settings page, if the “Custom Gallery Script” toggle switch is set to “ON”.

__SELF__.customlightboxscript
Type: string
The “Custom Lightbox Script” set on the plugin backend settings page, if the “Custom Lightbox Script” toggle switch is set to “ON”.

__SELF__.error
Type: string
If the plugin encounters an error, you can find the error description here.

No Comments
Back to top