Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
37 lines (25 sloc) 1.13 KB

GFFI

Gallery From a Folder of Images

The Gallery Plugin is for Grav CMS.

Manual Installation

To install this plugin, just download the zip version of this repository and unzip it under /your/site/grav/user/plugins. Then, rename the folder to gallery. You can find these files on GitHub You should now have all the plugin files under

/your/site/grav/user/plugins/gallery

Usage

Сreate a folder /your/site/grav/gallery and put the files named *t.Png (t - mean thumbnail)

On the page, insert:

<center>
	<div class="pure-g-r">
		{% for files in Gallery() %}
			<div class="pure-u-r"><img src="gallery/{{ files }}"></div>
		{% endfor %}
	</div>
<center>

to display the gallery and switch Pages->Advanced->Overrides->Process - twig

To Do

  • replace path /site/grav/gallery on the path of the current page: $dir= $grav['page']-> filePathClean(); does not work
  • [+] move html code to page as twig
  • maybe in the future by clicking on a thumbnail will open the complete files
  • move html code in template file