Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • syn-rg 282 posts 425 karma points
    Jun 07, 2012 @ 04:16
    syn-rg
    0

    Repeatable Custom Content from current page values not displaying

    I can't get the values from my "Repeatable Custom Content v2" to display on the page correctly.

    I'm using Umbraco 4.7.1 and understand that this could be an issue.

    I can't figure out how to display each seperate property type. I can get all the data to display in one line, but I want to seperate each value correctly.

    I've added the datatype to my document type, and added the macro to the template. I want to display on the front end the values from that current page. (Not from a child page)

    Here's how I've got it displaying so far on the front end:

              <h2>Repeatable Custom Content: Item 1</h2><ul><li>
    Property 1 value: Black Rock21/06/2012 10:00:0066Under InvestigationCheltenham28/06/2012 14:00:0010Unknown</li><li>
    Property 2 value: </li><li>
    Property 3 value: </li></ul><h2>Repeatable Custom Content: Item 2</h2><ul><li>
    Property 1 value: Black Rock21/06/2012 10:00:0066Under InvestigationCheltenham28/06/2012 14:00:0010Unknown</li><li>
    Property 2 value: </li><li>
    Property 3 value: </li></ul>

    </div>

    Here's my current XSLT:

      <!-- Input the repeatable custom contents property alias here -->
      <xsl:variable name="propertyAlias" select="string('gasOutages')"/>
      
      <xsl:template match="/">

        <!-- The fun starts here -->
        <xsl:if test="$currentPage/gasOutages != ''">
          <xsl:for-each select="$currentPage/gasOutages/items/item">
            <h2>Repeatable Custom Content: Item <xsl:value-of select="position()"/> </h2>
            <ul>
              
              <li>
                Property 1 value: <xsl:value-of select="$currentPage/gasOutages" disable-output-escaping="yes"/>
              </li>
              
              <li>
                Property 2 value: <xsl:value-of select="umbraco.library:FormatDateTime($currentPage/gasOutages/estimatedRestoreTime, 'dd MMMM yy')"/>
              </li>
              <li>
                Property 3 value: <xsl:value-of select="./affectedCustomers" disable-output-escaping="yes"/>
              </li>
              <xsl:if test="$currentPage/gasOutages/items/item/cause != ''">
              <li>
                Property 3 value: <xsl:value-of select="$currentPage/cause" disable-output-escaping="yes"/>
              </li>
              </xsl:if>
            </ul>
          </xsl:for-each>

          <!-- Live Editing support for related links. -->
        <xsl:value-of select="umbraco.library:Item($currentPage/@id,$propertyAlias,'')" />
       </xsl:if>

      </xsl:template>

    As you can see I can get the entire string of data, but I want it to be seperated into its respective list item.

    Can anyone suggest how I can fix this? Or a similar package that would achieve what I want?

    Cheers, JV

  • syn-rg 282 posts 425 karma points
    Jun 07, 2012 @ 04:33
Please Sign in or register to post replies

Write your reply to:

Draft