Copied to clipboard

Flag this post as spam?

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


  • Openfield Creative 62 posts 222 karma points
    Jun 06, 2016 @ 18:50
    Openfield Creative
    0

    MNTP and SEO friendly urls

    Typically when doing filtering on a site, we will set up a folder in the content root for tags/categories and then configure a tree picker to let the user select the tags that apply to the page. Then when someone browsing the sites wants to see all items with a certain tag they would end up on a url like www.domain.com/artcles?tag=1234. Then in code I can run something like

    artcles.Children.Where(x=>x.GetPropertyValue<string>("mntp").Contains("tag"))
    

    What I would like to do is have a user go to www.domain.com/articles?tag=our-cool-tag and then be able to run a similar piece of code to see which articles contain that tag. Since the MNTP stores its values as node ids i'm not sure how to make that comparison in the .Where clause. Is there some way to essentially run a loop within the where or would I need to essentially create my own list of content by doing something like this:

        var list = new List

    I don't really like the idea of doing this double loop as i'm concerned about performance as more and more content gets added. Can anyone way in on whether my concerns over performance are warranted or is there a better way overall of handling tagging?

    Thanks,

    Owen

Please Sign in or register to post replies

Write your reply to:

Draft