One way would be to create a DataType based on ListItem, in the Developer tab. Add the manufacturers to this DataType, and then add this DataType to your Product DocumentType, call it 'manufacturer' say.
You could then search for the Product nodes that have the value of manufacturer set to the manufacturer that you are interested in, $filterCriteria, like this:
"contains" was used in this example as "categorisation" was a checkbox field. But you could change [contains(data[@alias='categorisation'],$filterCriteria)] to [string(data [@alias='manufacturer']) != 'ford']
I created a new Data type "manufacturer picker" set it to Ultimate Picker and set the node to the root of the manufactures in the hierachy.
Within the product doc type I have included this new data type control.This works just fine.
However I am a bit confused with the syntax to pull in the Manufacturer logo ("manufLogo") which is a upload control with the "Manufacturers" doc type.
I need to match the Manufacturer Name called "bodyTitle" from the "Manufacturers" heirarchy to the selected product field "manufacturer" in the products heirarchy, then get the manufLogo path to insert into a img src
Where do I setup the filterCriteria?
I suspect the XSLT needs to traverse the tree until it gets to manufacturers and then find a match with the sub nodes that have a matching BodyTitle.
It seems a little backward to be matching varchars when a numeric would be much faster...or is that not really a consideration?
What value is being stored in the product doc type with the Ultimate Picker field, that has the manufacturer picker. If you do the following, what output do you get? With the old schema (what version of Umbraco/schema are you using?):
XSLT where statement
How would you do a join in the XSLT?
For instance with SQL i would do a a where statement to pull in all records that matched the variable.
Is this possible in XSLT?
I have a product and I want to associate a manufacturer. So the product is on the many side et al. Could someone point me in the right directions.
Thank you.
One way would be to create a DataType based on ListItem, in the Developer tab. Add the manufacturers to this DataType, and then add this DataType to your Product DocumentType, call it 'manufacturer' say.
You could then search for the Product nodes that have the value of manufacturer set to the manufacturer that you are interested in, $filterCriteria, like this:
"contains" was used in this example as "categorisation" was a checkbox field. But you could change [contains(data[@alias='categorisation'],$filterCriteria)] to [string(data [@alias='manufacturer']) != 'ford']
Richard
Hmm I think I have done what you suggested.
I created a new Data type "manufacturer picker" set it to Ultimate Picker and set the node to the root of the manufactures in the hierachy.
Within the product doc type I have included this new data type control.This works just fine.
However I am a bit confused with the syntax to pull in the Manufacturer logo ("manufLogo") which is a upload control with the "Manufacturers" doc type.
I need to match the Manufacturer Name called "bodyTitle" from the "Manufacturers" heirarchy to the selected product field "manufacturer" in the products heirarchy, then get the manufLogo path to insert into a img src
Where do I setup the filterCriteria?
I suspect the XSLT needs to traverse the tree until it gets to manufacturers and then find a match with the sub nodes that have a matching BodyTitle.
It seems a little backward to be matching varchars when a numeric would be much faster...or is that not really a consideration?
What value is being stored in the product doc type with the Ultimate Picker field, that has the manufacturer picker. If you do the following, what output do you get? With the old schema (what version of Umbraco/schema are you using?):
Richard
is working on a reply...