Ive searched around for getting random nodes, so i got the general gist of it, but here comes the twist.
Each company profile, is made up of one document template, but has six sub documents, that are made as tabs, and the information is spread all over those documents.
So, not only do i need to pick five random (of course without the possibilty of the same shown twice), which by itself is relatively easy, i have to somehow get the information from its sub nodes. (im still learning the umbraco jargon, forgive me if i confuse you).
Getting information from one document type, or node so to speak, is easy enough, but the information is spread over those nodes that act as its tabs.
Hope it helps a tiny bit.If you need any other information, please ask, and sadly, the Edit function doesnt work correctly here as im sure i want to add something after i clicked Submit.
I guess spitting out the info from the *Tab x* thingies (I guess those are sub nodes to the 'Example company' nodes?) depend on what type of info is contained in those nodes. Are these nodes all of the same document type? Or all different?
If those nodes are of the same type, then you can iterate those in xslt (see code snippet below)
Above snippet iterates child nodes of the current node and writes out the node name (as it appears in the content tree) and a property who's alias is propertyAlias (change it to whatever alias you've set)
Thank you for your reply, im not at work right now so i cant get the names but, the document types are different. the "Example comany" is a node of a document that node alone uses, the child nodes (the tabs), are of a different document type (but they all use the same).
If its too difficult, i will try and convince the content editors to put the info i need in the parent node, will make it easier but kind of a work-around.
Populating a slider with random nodes. With a twist.
The site im working on, has a simple slider on the frontpage, thats supposed to list five random company profiles.
Right now its wired up but only shows hard-coded information.
This is the short version of the current xslt file: (short as in, ive cut it down to just one hard-coded element)
Ive searched around for getting random nodes, so i got the general gist of it, but here comes the twist.
Each company profile, is made up of one document template, but has six sub documents, that are made as tabs, and the information is spread all over those documents.
So, not only do i need to pick five random (of course without the possibilty of the same shown twice), which by itself is relatively easy, i have to somehow get the information from its sub nodes. (im still learning the umbraco jargon, forgive me if i confuse you).
Main
-Section 1
--Sub-Section
---Company profiles
----Example company
------- Tab 1
------- Tab 2
------- Tab 3
------- Tab 4
------- Tab 5
Getting information from one document type, or node so to speak, is easy enough, but the information is spread over those nodes that act as its tabs.
Hope it helps a tiny bit.If you need any other information, please ask, and sadly, the Edit function doesnt work correctly here as im sure i want to add something after i clicked Submit.
Frederik,
I guess spitting out the info from the *Tab x* thingies (I guess those are sub nodes to the 'Example company' nodes?) depend on what type of info is contained in those nodes. Are these nodes all of the same document type? Or all different?
If those nodes are of the same type, then you can iterate those in xslt (see code snippet below)
Above snippet iterates child nodes of the current node and writes out the node name (as it appears in the content tree) and a property who's alias is propertyAlias (change it to whatever alias you've set)
Still confused? More questions? Just shout!
Cheers,
/Dirk
Thank you for your reply, im not at work right now so i cant get the names but, the document types are different. the "Example comany" is a node of a document that node alone uses, the child nodes (the tabs), are of a different document type (but they all use the same).
If its too difficult, i will try and convince the content editors to put the info i need in the parent node, will make it easier but kind of a work-around.
is working on a reply...