Copied to clipboard

Flag this post as spam?

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


  • Shane A. McGarry 1 post 21 karma points
    Dec 10, 2013 @ 17:59
    Shane A. McGarry
    0

    Rendering Standard Fields into a Template

    I seem to be having difficulty rendering standard fields into a masterpage template for a particular document type.  Here is the scenario.

    I have a SlideShow document type and Slide document type (Slide is a child of Slideshow).  Slideshow doesn't have any custom properties, just the standard ones that are on all document types (name, created, created by, etc).  The slideshow document type has a template associated with it (we use webform master pages).  That template has some javascript to handle the slideshow itself as well as an .xslt macro to render out the individual slides (represented by the slide document type).  My problem is this.  At the top of the template, I wish to render the Name of the slideshow along with the author and the date it was created and last updated.  Normally I do this the <umbraco:item> tag and it works for my other document types (see code snippet below) but for some reason, I'm getting empty values when i try it on the masterpage template that is tied to the slideshow document type.  What am I missing?

    [code]

    <h1><umbraco:Item runat="server" field="title" /></h1>
    <div>
         <strong>By: </strong><umbraco:Item runat="server" field="author"/><br />
         <strong>Posted: </strong><umbraco:Item runat="server" field="articleDate"                 xslt="umbraco.library:FormatDateTime({0},'dd MMMM yyyy')" /> |

         <strong>Updated: </strong><umbraco:Item runat="server" field="articleDate" xslt="umbraco.library:FormatDateTime({0},'dd MMMM yyyy')" />

    </div>

    [/code]

  • Funka! 398 posts 661 karma points
    Dec 10, 2013 @ 23:46
    Funka!
    0

    You said that your parent document type "Slideshow" doesn't have any custom properties on it, so "title", "author", and "articleDate" are all returning blank because these do not exist.

    The built-in properties closest to what you are trying are named "pageName", "creatorName", and "updateDate", which might be more what are you looking for? Best of luck to you!

Please Sign in or register to post replies

Write your reply to:

Draft