In the top navigation CMS template you can display images on a page, with or without captions, that pop-up into a gallery of images that the user can click through. Creating these galleries involves some code editing.
- Create your images using the Image Editor in the CMS. You will need to create the size that you will display on the page and either a 765 Banner, 1024 Feature, or 1600 Feature for the pop-up.
- Insert the images inline on your page or highlight using the icon.
- Select each image and link it to the 765 Banner, 2014 Feature, or 1600 Feature size of itself using the CMS link icon ().
- Access the code using the Source Code button (<>).
- Find the link tag for each image. It should look like
- Just after the “a” add class=”fancybox” rel=”group” so your code may look something like
<a class="fancybox" rel="group" href="...">
Note: if you are linking to YouTube or Vimeo, use a class of “various” instead of “fancybox”.
- Find the image tag for each item, which should be right after the “>” of the link code you just edited. It should look like
- Just after the “img” add data-fancybox-group=”group” so you code may look something like
<img data-fancybox-group="group" src="..." />
- Your final code should look like the following for each image in the gallery.
<a class="fancybox" rel="group" href=" . . . "><img data-fancybox-group="group" src=" . . . "></a>
- You can save your work and preview the item to see the working gallery.
- Remember to direct or return all items created or edited to Public when done.
You can see an example of a pop-up image gallery on the Michigan Tech Class Ring page. Click on one of the ring images at the top of the page to access the gallery. You can also add captions to the images displayed on the page (not in the gallery).