Copied to clipboard

Flag this post as spam?

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


  • Niels Bosma 8 posts 29 karma points
    Mar 23, 2010 @ 20:16
    Niels Bosma
    1

    Bug? Problems with GetApprovedRecordsFromPage

    Why do I get records with state = submitted and approved with:

    <xsl:variable name="records" select="umbraco.contour:GetApprovedRecordsFromPage($paramPage)" />

    (I have my form set to "manual approval")

    Is there any way to only get records with state Approved?

     

     

  • Laurence Gillian 600 posts 1219 karma points
    Mar 31, 2010 @ 16:46
    Laurence Gillian
    0

    Did you get any where with this? I'm currently looking into this issue myself. Thanks, Lau

  • Laurence Gillian 600 posts 1219 karma points
    Mar 31, 2010 @ 17:29
    Laurence Gillian
    2

    My solution was to use the GetRecords function, and then just filter them;

    <xsl:variable name="records" select="umbraco.contour:GetRecordsFromPage($currentPage/@id)/uformrecord[state = 'Approved']" />
  • Jacob Polden 67 posts 177 karma points
    Apr 20, 2012 @ 12:08
    Jacob Polden
    0

    @LaurenceG

    Can you translate your select statement into razor?

    This is what I have at the moment: @foreach (dynamic record in Contour.Addons.DynamicObjects.Library.GetApprovedRecordsFromPage(@Model.Id).OrderBy("Created"))

    ***************************************************************************************************************************************************************************************************************

    LaurenceG answer:

    My solution was to use the GetRecords function, and then just filter them;

    name="records"select="umbraco.contour:GetRecordsFromPage($currentPage/@id)/uformrecord[state = 'Approved']"/>
  • Laurence Gillian 600 posts 1219 karma points
    Apr 20, 2012 @ 12:56
    Laurence Gillian
    0

    Hi Jacob, I've not used Contour via Razor yet, so I've not got any experience of its API. If I have to work over the weekend, I'll fire up Visual Studio and have a look (: Good luck! Laurie

  • Jacob Polden 67 posts 177 karma points
    Apr 20, 2012 @ 13:34
    Jacob Polden
    0

    Thank you very much for the reply! If you do let me know via twitter or whatever.

    Jacob 

Please Sign in or register to post replies

Write your reply to:

Draft