Copied to clipboard

Flag this post as spam?

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


  • Bex 444 posts 555 karma points
    Jul 05, 2010 @ 12:01
    Bex
    0

    PD Calendar - so date of event on event page?

    Hello

    I am new to Umbraco and PDCalendar and feel I am falling at the first hurdle..

    I am using the PDFCalendar and have a calendar with my events listed and when I click on an event it goes to the event page. On this page I want to show the date of the event. How do I do this?

    Is there a page field Id I should use? 

    Thanks

    Bex

  • Peter Dijksterhuis 1442 posts 1722 karma points
    Jul 05, 2010 @ 12:27
    Peter Dijksterhuis
    0

    Hi,

    If you use recurrence options, there's no way of knowing what date your user clicked on in the calendar.

    PDCalendar only stores the startdate of the event, not all other dates the event occurs on.

    However, you could include the date in the URL (querystring) and show that on your page.

    Does this help?

    Peter

  • Bex 444 posts 555 karma points
    Jul 05, 2010 @ 12:32
    Bex
    0

    Hi Peter

     

    Currently I have not got recurring dates, just one offs so if I could get at the start date I'd be able to use that.
    How do I get at that, does it have a pagefield ID?

    Also do you have an example of how I'd pass the date using the query string for future use?

    If this is all documented somewhere feel free to point me at it as I can't seem to find any documentation other than how to install it?

    Thanks

    Bex

  • Peter Dijksterhuis 1442 posts 1722 karma points
    Jul 05, 2010 @ 13:14
    Peter Dijksterhuis
    0

    For displaying the startdate, you can use:

    <xsl:value-of select="$currentPage/data[@alias = 'Event' ]/pdcalendarevent/pdcstart "/>

    Where you should replace 'Event' with the name you gave the property in the documenttype.
    Peter

  • Bex 444 posts 555 karma points
    Jul 05, 2010 @ 13:22
    Bex
    0

    Can I put this directly on the page? Or do I have to create an xslt file for it?

    I'm sorry for the possibly studpid questions.. I am very new to umbraco and am finding the concepts very different to my normal way of working and a little difficult to grasp!

  • Peter Dijksterhuis 1442 posts 1722 karma points
    Jul 05, 2010 @ 13:35
    Peter Dijksterhuis
    0

    Yes, you'd have to create a xslt-macro for this. Then include the macro in your template.

  • Bex 444 posts 555 karma points
    Jul 05, 2010 @ 15:10
    Bex
    0

    Thanks for that! Works great!

    Now my final questions. How do I access that Value from my c# code behind?

    I know when they arepage fields you just call by ID, presumably you can't do that here..

  • Peter Dijksterhuis 1442 posts 1722 karma points
    Jul 05, 2010 @ 17:25
    Peter Dijksterhuis
    0

    You can retrieve the value of the property (of datatype pdcalendar) like you would get any other value.

    The data stored in that value is xml (the startdate is part of that xml-chunk).

Please Sign in or register to post replies

Write your reply to:

Draft