Copied to clipboard

Flag this post as spam?

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


  • Tom Newton 3 posts 23 karma points
    Jan 18, 2013 @ 15:37
    Tom Newton
    0

    Add a condition when showing sub pages

    I'd be very grateful for help in solving this problem and would happily pay someone (via PayPal) for the solution.

    I'm using the built in 'Show Sub Pages' feature:

    @inherits umbraco.MacroEngines.DynamicNodeContext

    @{ var numberOfItems = 100; }

        @foreach (var item in @Model.Children.Where("Visible").Take(numberOfItems))

        {

    BUT, I need to add a simple search facility so only certain results are shown.

    Have a look here - http://www.cumbria-pcc.gov.uk/governance-transparency/document-library.aspx

    There's 3 search options, when the page is submitted, they appear as fm1, fm2 and fm3 in the URL. I've also managed to bring the value onto the page but don't know how to amend the 'where' string.

    If I was doing it in SQL it would read something like this

    where (@item.category = fm1) and (@item.pageName = fm2) and (@item.documentDescription = fm3)

    Any ideas?

    Thanks in advance

    Tom

  • Claushingebjerg 939 posts 2574 karma points
    Jan 29, 2013 @ 11:02
    Claushingebjerg
    0

    Hi Tom

    I would suggest you ask in the razor forum. Us xslt folks might not be of much help :)

     

Please Sign in or register to post replies

Write your reply to:

Draft