Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
What is the best way to get a node from a URL part?
I want to find the node for any given part in a URL, so I don't think I'm after IContentFinder. I need to run this from in a helper class, so just pass in the URL, and get out the node that matches the first part of the URL (I can't use AncestorOf etc. as actually, the node sits outside of main site structure so it can be reused.
I have been able to build the URL so that I can have: http://example.com/Restaurant1/MultiUseNode/ and loading that content is fine using IContentFinder.
However, from my MultiUseNode template, I want to easily find what restaurant is currently being viewed.
I can manually look it up from a class using the URL, but then am I not getting any caching goodness like I would in IContentFinder?
Any thoughts would be appreciated.
(trying to keep structure simple for editors, so had thought of auto-creating MultiUseNodes under each restaurant, but as you're all aware, keeping it simple for one person makes it more complicated for others, i.e. me!)
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted