i started on a simple project for umbraco and i am in need of a category section. That's why i started to create pages for categories. In websites section i am using "Xpath Checkboxlist" to select categories. Until this point everything is just fine I can see the categories that i choose in websites editing page.
For example in the cccc.com page people should be able to click on Fashion category link. And in Fashion page all fashion websites should be listed. I couldn't find any example for this. I would be glad if you could guide me in this matter.
How about using Picker Relations to watch the XPath CheckBoxList, this can create relationships between the Website and Category enabling quick queries to get all Websties in a given Category. This post gives the general idea, but instead of rendering the list in the back office, you can then use the Relaions API to render the list on the frontend.
If you need to render them in the frontend you'll probably be able to get what you need using the GetRelatedNodes() or GetRelatedNodeAsXml() extensions from umbraco.library. (Don't seem to be much documentation for them at the moment, but maybe you can add that when you've found out how to use them? :-)
Categorisation through Xpath Checkboxlist
i started on a simple project for umbraco and i am in need of a category section. That's why i started to create pages for categories. In websites section i am using "Xpath Checkboxlist" to select categories. Until this point everything is just fine I can see the categories that i choose in websites editing page.
Websites
- aaaa.com
- bbbbb.com
- cccc.com
- etc.com
Categories
- Fashion
- Electronics
- etc...
My problem is too create both sided relationship.
For example in the cccc.com page people should be able to click on Fashion category link. And in Fashion page all fashion websites should be listed. I couldn't find any example for this. I would be glad if you could guide me in this matter.
Best,
Hi Kadir,
How about using Picker Relations to watch the XPath CheckBoxList, this can create relationships between the Website and Category enabling quick queries to get all Websties in a given Category. This post gives the general idea, but instead of rendering the list in the back office, you can then use the Relaions API to render the list on the frontend.
HTH,
Hendy
Hi Hendy,
thank you for your reply, this post looks awesome. I will be checking now.
Best,
Hi again,
I have followed the tutorial, it worked perfectly. But i am having difficulties on rendering the Relations list on the frontend. Any clues?
thanks again.
Hi Kadir,
If you need to render them in the frontend you'll probably be able to get what you need using the GetRelatedNodes() or GetRelatedNodeAsXml() extensions from umbraco.library. (Don't seem to be much documentation for them at the moment, but maybe you can add that when you've found out how to use them? :-)
/Chriztian
Hi Chriztian,
thanks for the tip. I will check them now :)
Best
is working on a reply...