0

I want to have a front page gallery that is comprised of images from different channels, and I want to have the title of the channel that the image comes from to appear with the image.

My plan was to create an entry called "Front Page Gallery" and load it with stored images.

Additionally, I want to be able to create a link to the gallery section that the image is originally from.

Any ideas?

MORE INFO

Sort of going with parscale's suggestion below, I used instead {image:entry_id} this way, but it didn't solve my issues:

<!--title info and link--> {exp:channel:entries channel="portfolio" entry_id="41" limit="1" disable="categories|member_data|pagination"} {exp:channel_images:images entry_id="{entry_id}" exclude_category="closed"} <a class="frontlink" href="{title_permalink="portfolio/gallery"}">From the {exp:low_replace find="31|32|33" replace="GallerySPACE1|GallerySPACE2|GallerySPACE3" multiple="yes"} <em>{image:entry_id}</em> {/exp:low_replace} series.</a> {/exp:channel_images:images} {/exp:channel:entries}

So with this, I'm able to generate a caption for each image that gives the name of the entry it is originally from (e.g., "Gallery 1") by manually using Low Replace to convert the entry ID of each image to the name of the entry. But I find this really clunky and not good as new entries are added. So I'm trying to find a more automatic way to get the original entry name of the image.

Next issue is in trying to create a link from the image's entry name to the first image in it's original gallery: right now what I've got (and it's not working) is this link:

href="{title_permalink="portfolio/gallery"}"

But this doesn't work. What I need is this link:

href="{title_permalink="portfolio/gallery/gallery_1"}"

Any thoughts also as how to get the image's original entry short name into the link?

1

Yes you can, but you would need to look up the channel name.

If you use the {exp:channel_images:images} tag you will see a variable {image:channel_id}.

This can be used to look up the channel name with a simple query if you wish or write a simple switch yourself for the numbers.

| improve this answer | |
  • Hi, I added more detail in an edit above. The {image:channel_id} wasn't useful (unless I wasn't using it correctly) because the way I have this front page set up is I've created a new entry (Front Page Gallery) and so {image:channel_id} references "Front Page Gallery" instead of the entry name that the images originally come from. – edward Oct 14 '15 at 5:00
  • Is there a way to do what I'm proposing, or do I need to move this to paid support? – edward Oct 16 '15 at 4:25
  • You lost me a little, so probably best to get a full support request. I showed you above how you can get the channel_id, so I am not exactly sure what you need. – Parscale Oct 16 '15 at 23:04
0

How are you planning on pulling in the images from different channels? Relationships? If so, you should just be able to call the images channel using {relationship_prefix:channel}

| improve this answer | |
  • My plan was to create an entry called "Front Page Gallery" and load it with stored images, because I feel this is the easiest way for my client to work with this. Not sure if you saw this, but I'm using Channel Images from devdemon. – edward Oct 13 '15 at 1:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.