I’m using entry titles as links to different section of a photo gallery. How can I highlight the selected entry to show that’s section the user is on.
This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.
The active forums are here.
April 16, 2012 12:57pm
Subscribe [2]#1 / Apr 16, 2012 12:57pm
I’m using entry titles as links to different section of a photo gallery. How can I highlight the selected entry to show that’s section the user is on.
#2 / Apr 16, 2012 2:16pm
You can compare the segment ID to the entry url title to highlight certain sections. Eg:
{if segment_2 == url_title}class="active"{/if}#3 / Apr 16, 2012 4:29pm
brilliant, that worked a charm, thanks! although it only works once a link is clicked. As default I’m displaying all the image thumbnails from the first entry, how can I dynamically have the first entry always selected so that it get’s the class of active?
#4 / Apr 17, 2012 11:45am
Hello nomoretables,
I am going to move this thread over to the Community Help Forum where you are sure to get some practical advice.
One thing to experiment with is using an embedded variable.
{if embed:which_photo=='first'} class="active"{/if}It might also help to see your template code so we can better understand what you are doing.
Cheers!