Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Back End Image Galleries using Cycle.js and Kirby CMS

  • This topic is empty.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #45243
    dfogge
    Participant

    Hi, I’m using Kirby for the first time and it’s pretty sweet. I’m currently running into a little snag and was hoping someone here could help.

    I’m building a portfolio site for a designer, and I’m trying to build the gallery pages. The folder structure for the site is like this:

    content/
    01-music/
    01-project/
    01-image.jpg
    02-image.jpg
    03-image.jpg
    02-project/
    01-image.jpg
    02-image.jpg
    03-image.jpg
    02-logos/
    01-project/
    01-image.jpg
    02-image.jpg
    03-image.jpg
    02-project/
    01-image.jpg
    02-image.jpg
    03-image.jpg
    03-advertising/
    01-project/
    01-image.jpg
    02-image.jpg
    03-image.jpg
    02-project/
    01-image.jpg
    02-image.jpg
    03-image.jpg

    On music.php, logos.php, and advertising.php I’d like to dynamically pull in one project’s contents at a time and allow the user to select a different project to view by clicking different links in a sidebar. I’d like to accomplish this without refreshing the page if possible.

    I’m also going to only show one image at a time from each project using the cycle.js plugin, and hide the rest until the user selects previous or next.

    Here’s the php that I have pieced together so far to retrieve the project images, but currently it only seems to be retrieving the last project in each subfolder:

    chrisburton
    Participant

    So let’s say you’re on the music page, it only shows the content from `02 Project`?

    #137356
    dfogge
    Participant

    Thanks Ben! That got it to load everything perfectly!

    #138332
    dfogge
    Participant

    I hate to resurrect this question, but I’m still having a little trouble getting what I want.

    I need the images from each project to only load when the user clicks the relevant link in a sidebar.

    My current code is pulling in everything, which is a good start, but I’m not sure if I need to create a unique php file for each project or if Kirby can do it dynamically somehow.

    Thanks again!

Viewing 4 posts - 1 through 4 (of 4 total)
  • The forum ‘Back End’ is closed to new topics and replies.