new to razor and 2sxcontent needs bit more help

May 7, 2014 at 11:40 AM

thanks for the previous help on the master detail sample

have on more use case I need help with

i have list of items

categories ( content type categories ) ( more categories possible )

now i want to filter them on querystyring


what would be the best way to do this ( seeing the value i need filter on is not directly part of the main list

May 8, 2014 at 8:51 PM
Working on a simple demo - almost ready. Should get it by Friday or Monday :)
May 13, 2014 at 12:11 PM
would be interested to see the demo as well. I just finished a similar app but i made it with client side filtering sorting and paging

May 14, 2014 at 9:03 AM
Edited May 14, 2014 at 9:03 AM
And a screencast

screencast of app
May 14, 2014 at 2:34 PM
way cool :)!

care to publish the app to the catalog?
May 14, 2014 at 4:01 PM
sure when I have all this done and figured oud I will publish a sample app to the catalog ( minus most of the script as that is from codecanyon ) I put a link in getting started where the plugin can be bought
May 21, 2014 at 5:15 AM
is this sample app available yet would be interested to see how its done
Jun 2, 2014 at 6:56 AM
I forgot about the original question because of the intermediate posts which were a slightly different topic.
a) there is a demo that does it here, but we realized that it's a rather difficult piece of code just to do something so common... we created a data source for it, which should be released within the next 72 hours (that's when 2sxc 6.1 should be out & stable)

Jun 3, 2014 at 9:38 PM
Almost done, 6.1 will be released tomorrow. The code will be very simple then, like this:
    // Prepare the data - get all categories through the pipeline
    public override void CustomizeData()
        // new features in 6.1 - the App DataSource CreateSource<App> and also the RelationshipFilter
        var appData = CreateSource<App>();

        // Just add the items which have the relationship to the category in the URL
        var qsOfCat = CreateSource<RelationshipFilter>(appData["QandA"]);
        qsOfCat.Relationship = "Categories";
        qsOfCat.Filter = "[QueryString:Category]";
        Data.In.Add("QandA", qsOfCat["Default"]);
Jun 4, 2014 at 8:08 AM
very nice

will you also be able to chain the filters

as you can see from my screenshot i have a category and a theme filter can these be combined in the above setup
Jun 4, 2014 at 9:24 AM

You can always chain filters - this was always possible already. In many examples you'll see a type-filter and then chained with a value-filter and chained with a sort-data-source. This is still possible.