0
votes

I have a custom page type with two transformation. The first transformation is as follows:

<li><%# Eval("AlertDate") %> - <%# Eval("AlertTitle") %> <%# IfEmpty(Eval("AlertCopy"),false, "<a href='" +  GetDocumentUrl() + "'>Read More</a>")  %></li>

My second Transoformation, the detail page so to speak is this:

<div id="alertDetail">
  <div id="alertDetail--heading">
    <h1><%# Eval("AlertTitle") %></h1>
    <p><%# FormatDateTime(Eval("AlertDate"), "MMMM dd, yyyy") %></p>
  </div>
  <div id="alertDetail--copy">
    <%# Eval("AlertCopy") %>
  </div>
</div>
<div class="backButton">
  <a href="javascript:history.back()" class="btn back"><%# CMS.Helpers.ResHelper.GetString("kff.Generic-Back") %></a>
</div> 

When the conditions are correct and the user clicks Read More there are taken to the page based on that page type. This page is nested in a cms.folder page type, which is intern nested in a page with a custom template. The structure is like this:

  • Root
    • Alerts
      • Non-Partner Alerts
        • Alert 1
        • Alert 2

Linking to the pages is working but i can't get the alerts data to display. I tried a repeater, but that gave me all the alerts, not the specific one i'm looking for.

I'm not sure what i'm missing here.

2

2 Answers

2
votes

I am guessing you want when you are on Alert 1 page to use the detail transformation?

You should use a repeater, and use transformation 1 (the one with the read more URL) as the Transformation, and use your Detail transformation as the Selected Item Transformation.

0
votes

Maybe you should add WHERE condition to second repeater settings like:

NodeID = {% CurrentDocument.NodeID %}