I have created a simple photo gallery that has the photos categorised using the built in categories functionality.
My template has a list of each category which acts as a link to display the photos for that particular category. This works absolutely fine.
Problem I am encountering is that when a user first visits the gallery page, it displays the photos from all categories. I would like to be able to only display the images from the first category.
My code to display the category links
<ul>
{exp:channel:categories channel="galleryImage" style="nested" class="category_list" sort="asc" show_empty="no" }
<li {if count=="1"} class="first" {/if} {if count=="{total_results}"} class="last" {/if} ><a href="http://{path=">{category_name}</a></li>
{/exp:channel:categories}
</ul>And my code to display the images
<ul class="pop-up">
{exp:channel:entries channel="galleryImage" limit="15" dynamic="on" }
<li><a href="http://{galleryImage}">"]{galleryImage}</a>
{title}</li>
{/exp:channel:entries}
</ul>Note I have tried setting one of the categories to default using
To set a default category for a Channel you would go to Admin > Channel Administration > Channels > Edit Preferences (Your Channel Name) > Administrative Preferences
I would prefer not to have to put the link on my site main navigation as something like
http://www.mysite.com/index.php/gallery/category/category1
as I do not know what the categories are in advance as this is something the client will do and they could change completely.
Thanks in advance