I am struggling a bit conceptually with the best way to do this:
I have a list of content pages in a shared repository, I want some of these content pages to be related to content in other parts of the site. I'm using a multi-node tree picker in the shared content nodes to pick which other nodes they are related to.
How would I go about rendering the content of the shared node on the nodes that were picked?
I can't do it the normal way where I'd just put a MNTP on the node and render the picked content.
Thanks for any insight as to how to make this happen best!
I think maybe something like the below (1234 is the node id of the shared node) and assuming that the nodes you want are all children of the shared node?
Step one would be to first create the Relation Type in the Dev section. The best bet here would be to use Bi-Directional.
After that I would recommend checking out the nuPickers Package as all those pickers can have a Relation Alias tied directly to them. Once you have the dataType created with the Relation Tied to it, you could use it to replace your MNTP.
Whenever you Save and Publish a node with the picker it will update the relations with the Parent / Child Ids. Now that you have that relation data you can use the Relations API service to query based on the RelationAlias and pull out those that are related to the current node.
I've not, what's the advantage of using relations? How does it support a relation with multiple nodes?
Jeavon's solution for MNTP worked so marking as answer, but curious as to why you think relations might be a better option.
I'm trying to relate a post to one or several locations and MNTP seems to work nice since it brings up the search for list view, now can have multiple start nodes, etc.
Yes totally - Jeavon's solution met what you were looking for and the multiple start node sounds like a plus for the Out of the Box MNTP.
Using relations can provide a few deeper hooks and more info in the back office in some instances. For example. Say you have Blog Post A and it is selected on 10 nodes in your content tree, using relations you could programmatically see all those selections. Better still in nuPickers there is a "RelatedLabels" datatype that will display to you all the related nodes to the content Node you are on. So your editors could look at Post A in the back office and there is a list right there showing all the pages that have it selected. (you can even hook in a macro to customize that list display)
Displaying relations to the front-end there is the Relation API. We have used it and really like it, but just keep in mind that using it is potentially one more query to the DB.
The original post that got me into using Relations was "Who Picked This". It's a little dated now because it refers to Ucomponents on earlier Umbraco versions, but the concepts and usefulness are still the same and transferable to to an implementation using the nuPickers.
Yes that's possible by using the Relations Only save format. (Note: this works in v1.4.1 - there's currently an issue in v1.5.0+ but this will be fixed for the next release)
MNTP how to check what's picked from other nodes?
Hi,
I am struggling a bit conceptually with the best way to do this:
I have a list of content pages in a shared repository, I want some of these content pages to be related to content in other parts of the site. I'm using a multi-node tree picker in the shared content nodes to pick which other nodes they are related to.
How would I go about rendering the content of the shared node on the nodes that were picked?
I can't do it the normal way where I'd just put a MNTP on the node and render the picked content.
Thanks for any insight as to how to make this happen best!
Amir
Hi Amir,
I think maybe something like the below (1234 is the node id of the shared node) and assuming that the nodes you want are all children of the shared node?
Jeavon
Hi Amir,
Have you thought about using Relations?
Step one would be to first create the Relation Type in the Dev section. The best bet here would be to use Bi-Directional.
After that I would recommend checking out the nuPickers Package as all those pickers can have a Relation Alias tied directly to them. Once you have the dataType created with the Relation Tied to it, you could use it to replace your MNTP.
Whenever you Save and Publish a node with the picker it will update the relations with the Parent / Child Ids. Now that you have that relation data you can use the Relations API service to query based on the RelationAlias and pull out those that are related to the current node.
Ed
Hi Ed,
I've not, what's the advantage of using relations? How does it support a relation with multiple nodes?
Jeavon's solution for MNTP worked so marking as answer, but curious as to why you think relations might be a better option.
I'm trying to relate a post to one or several locations and MNTP seems to work nice since it brings up the search for list view, now can have multiple start nodes, etc.
Thanks!
Amir
Hi Amir,
Yes totally - Jeavon's solution met what you were looking for and the multiple start node sounds like a plus for the Out of the Box MNTP.
Using relations can provide a few deeper hooks and more info in the back office in some instances. For example. Say you have Blog Post A and it is selected on 10 nodes in your content tree, using relations you could programmatically see all those selections. Better still in nuPickers there is a "RelatedLabels" datatype that will display to you all the related nodes to the content Node you are on. So your editors could look at Post A in the back office and there is a list right there showing all the pages that have it selected. (you can even hook in a macro to customize that list display)
Displaying relations to the front-end there is the Relation API. We have used it and really like it, but just keep in mind that using it is potentially one more query to the DB.
The original post that got me into using Relations was "Who Picked This". It's a little dated now because it refers to Ucomponents on earlier Umbraco versions, but the concepts and usefulness are still the same and transferable to to an implementation using the nuPickers.
Ed, that is def interesting. Do you know if you could unselect the related content from the associated node? That would be huge.
-Amir
Hi Amir,
Yes that's possible by using the Relations Only save format. (Note: this works in v1.4.1 - there's currently an issue in v1.5.0+ but this will be fixed for the next release)
is working on a reply...