Detail Page

A detail page will create automatically one page for each item of a module. For example, if you have 4 offers in the unit data - cf https://app.gitbook.com/@galaxy-cms/s/project/~/drafts/-Lx21OiSABSvFWA-B1rj/core-concepts/unit-data - each of them will share the same detail page template but with it's own specific data.

<h1>{{item.name}}</h1>

<div>{{item.long_description</div>

#$loop|{{item.photos}}|{p}| $#
    <img src="{p.url_standard}" alt="{p.alt}">
#$/loop|{{item.photos}}|{a}| $#

{if=" '{{item.external_url}}' "}
    <div>
        <a href="{{item.external_url}}" target="_blank">__@@Visit Website@@__</a>
    </div>
{/if}

{{item}} will use the context of the page. For exemple you have an offer called "First Offer" and an other one called "Second Offer", {{item.name}} will return the right name for the right offer.

/!\ Do not forget to tell the page is a collection in Tester setup

If you create a CMS variable for a detail page, it's value will be the same for all detail pages

<h1>{{item.name}}</h1>

<!-- Same image for all detail pages of the module -->
<img src="#$variable|featured-image$#" alt="#$variable|featured-image.alt$#"> 

Last updated