+1-888-365-2779
Try Now
More in this section

Forums / Designing with Sitefinity / How to access blog post properties in blog control template

How to access blog post properties in blog control template

3 posts, 0 answered
  1. Chris
    Chris avatar
    9 posts
    Registered:
    25 Sep 2008
    12 Nov 2008
    Link to this post
    Hi,

    I've been tearing my hair out, trying to work out how to access various blog post properties when customising the single item blog post control template.

    For example, I want the posted date to appear twice, once at the top of the page, and once in the footer of the blog article.  However, the control that presents the blog post date looks like this:
    <asp:Literal ID="Publication_Date" runat="server" Text="{0}" />

    How can I create another literal control which also displays the publication date in another part of the template?

    I do seem to remember reading about a control that someone had created which allowed you to easily map content item properties to web controls ie you could map Publication Date to a control called litDate for example - but I can't find the original post or blog article where I read about this.

    Any ideas?

    Thanks

    Chris
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    12 Nov 2008
    Link to this post
    Hello Chris,

    Check out the following blog post at http://blogs.sitefinity.com.

    Below we map the values of meta-fields ( Publication_Date)  to any property of any control inside of a template

    <cc1:MetaMaster ID="MetaMaster1" runat="server">   
        <Mappings>  
            <cc1:MetaMapping MetaKey="Publication_Date" TargetControlId="testLabel" TargetProperty="Text" />  
        </Mappings>  
    </cc1:MetaMaster>            
        </p>      
      <asp:Label ID="testLabel" runat="server"></asp:Label> 

    I hope this helps.

    Kind regards,
    Ivan Dimitrov
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  3. Chris
    Chris avatar
    9 posts
    Registered:
    25 Sep 2008
    12 Nov 2008
    Link to this post
    Hi Ivan,

    Many thanks for your quick reply.  That's exactly what I was looking for!  I remember reading about MetaMaster but I couldn't find it.

    Thanks

    Chris
Register for webinar
3 posts, 0 answered