Copied to clipboard

Flag this post as spam?

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


  • Andrew 14 posts 34 karma points
    Feb 24, 2013 @ 22:13
    Andrew
    0

    Event Template

    I am trying to display event information on a page for a single event. I can't however work out how to access the PDCalendar properties. I found an article that gave an example of how to do it using an xslt macro for the properties and I've included that below. I'm sure this should be really straight forward but I can't seem to get anything to output other than the non-PD properties.

    I am wanting to display the event description, start and end date if possible. Any ideas?

    Event Template
    <%@ Master Language="C#" MasterPageFile="~/masterpages/BoilerplateMaster.master" AutoEventWireup="true" %>
    
    <asp:Content ContentPlaceHolderId="BoilerplateMainContentPlaceHolder" runat="server">
        <div class="cont-wrap clearfix" >
            <div class="content clearfix">
                <div class="event-item">
                    <a href="../school-information/calendar.aspx">Back to the Calendar</a>
                    <h1><umbraco:Item field="pageName" runat="server" /></h1>
                    <p>
                        <umbraco:Macro Alias="EventRender" runat="server"></umbraco:Macro>
                    </p>
                </div>
            </div>
        </div>
    </asp:Content>
    EventRender.xslt
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE xsl:stylesheet [ <!ENTITY nbsp "&#x00A0;"> ]>
    <xsl:stylesheet 
        version="1.0" 
        xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
        xmlns:msxml="urn:schemas-microsoft-com:xslt"
        xmlns:umbraco.library="urn:umbraco.library" xmlns:Exslt.ExsltCommon="urn:Exslt.ExsltCommon" xmlns:Exslt.ExsltDatesAndTimes="urn:Exslt.ExsltDatesAndTimes" xmlns:Exslt.ExsltMath="urn:Exslt.ExsltMath" xmlns:Exslt.ExsltRegularExpressions="urn:Exslt.ExsltRegularExpressions" xmlns:Exslt.ExsltStrings="urn:Exslt.ExsltStrings" xmlns:Exslt.ExsltSets="urn:Exslt.ExsltSets" xmlns:pdcalendar="urn:pdcalendar" 
        exclude-result-prefixes="msxml umbraco.library Exslt.ExsltCommon Exslt.ExsltDatesAndTimes Exslt.ExsltMath Exslt.ExsltRegularExpressions Exslt.ExsltStrings Exslt.ExsltSets pdcalendar ">
    
    
    <xsl:output method="xml" omit-xml-declaration="yes"/>
    
    <xsl:param name="currentPage"/>
    
    <xsl:template match="/">
    
        <xsl:value-of select="$currentPage/data[@alias = 'Event']/pdcalendarevent/pdcstart"/>
    
    </xsl:template>
    
    </xsl:stylesheet>
  • Jan Skovgaard 11280 posts 23678 karma points MVP 10x admin c-trib
    Feb 24, 2013 @ 22:46
    Jan Skovgaard
    0

    Hi Andi

    What version of Umbraco are you using?

    The above XSLT is trying to match the old XML schema Umbraco used before the release of 4.5 where it was changed. I'm guessing you're using a newer version hence the XML you're trying to match looks different.

    Looking forward to hearing from you.

    /Jan

  • Andrew 14 posts 34 karma points
    Feb 25, 2013 @ 13:34
    Andrew
    0

    I am running version 4.9. WHhat format should I be using for this do you know?

     

    Thanks,

     

Please Sign in or register to post replies

Write your reply to:

Draft