Forum

Thread tagged as: Question, Problem

How to link to a specific shared region element.

I have a template that is being shared using shared regions in two places on the same page. I have set it up so that only certain elements are shared from the original template into the new region. In this case, I'm just pulling images. I've also set it to allow multiple items. At the moment these are displayed in a list.

I wondered if it was possible to click on say the first 'post/image' and it jumps/links to the shared image positioned elsewhere on the page. Maybe if there was some way it could know what count or id to link to each individual image/post?

I basically need to be able to click on one image and it links to its shared version.

Below is the snippets of code I have set up at the moment to pull in the shared images...

    <?php perch_content_custom('grid', array(
    'page'=>'/index.php',
    'template'=>'largeimage.html'
    ));?>

Hopefully this makes sense, any help would be very much appreciated.

David Springate

David Springate 0 points

  • 7 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

You can use <perch:content id="_id" /> in your template to get a unique ID for the item.