Skip to content

Instantly share code, notes, and snippets.

@jasonvarga
Created January 24, 2013 03:18
Show Gist options
  • Save jasonvarga/4617359 to your computer and use it in GitHub Desktop.
Save jasonvarga/4617359 to your computer and use it in GitHub Desktop.
Product Index
{exp:ifelse parse="inward"}
{if segment_2}
{!-- If there's a segment_2, eg. /shop/my-product it means we're on a product page. --}
{embed="shop/_product"}
{if:else}
{!-- If there's no segment_2, eg. /shop/ it means we're on the listing page. --}
{embed="shop/_listing"}
{/if}
{/exp:ifelse}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment