I am creating a page in my site with a list of entries under 1 channel.
I have the template structure as follows:
- collections/ss14
- collections/aw14
- collections/index
The ss14/aw14 templates pull in data from the channel with all their entries listed here is my template so far:
<div id="container" class="collection">
{if segment_4 == "ss14"}
<div id="gallery-t-group" class="rsMinW">
<h1>this is the list view</h1>
{exp:channel:entries channel="ss14" dynamic="yes" url_title="{segment_4}"}
<div class="portfolio load-slide">
<img data-rsh="400" class="rsImg {dimension} root" src="{images}{url}{/images}" alt="{long_name}" />
<div class="rsTmb"><img class="{dimension}" src="{images}{url}{/images}"></div>
<input type="hidden" value="{path={site_short_name}/collections/{channel}/{url_title}}" class="perma_link" />
</div>
{/exp:channel:entries}
</div>
{/if}
{if segment_4 == ''}
<div id="gallery-t-group" class="rsMinW single">
{exp:channel:entries channel="ss14" dynamic="no"}
<div class="portfolio load-slide">
<img data-rsh="400" class="rsImg {dimension} root" src="{images}{url}{/images}" alt="{long_name}" />
<div class="rsTmb"><img class="{dimension}" src="{images}{url}{/images}"></div>
<input type="hidden" value="{path={site_short_name}/collections/{channel}/{url_title}}" class="perma_link" />
</div>
{/exp:channel:entries}
</div>
{/if}
<div class="rsnav-container">
</div>
</div><!--End Content-->
Basically the idea here is that I am trying to have a list layout if its under the url /collections/ss14 or /collections/aw14 and then when you go into the single entry itself /collections/ss14/entry-title or /collections/aw14/entry-title I would ideally need to have a different layout as it needs to be using some other parameters inside the channel entries tag.
Does anyone know a good solution to this problem as I am sure there are people who run into this problem all the time when dealing with expression engine.
Cheers