creating a getxmlnodebyid alike function for custom section.
Hello again.
I've created a custom section with some products and categories in it. Now i want to list these products like i can list normal content nodes.
Ive got a xslt extension set up where i can get the data but i have no way to get like the product name and product size then placing them apart where i want.
Hmm, not sure if I understand that correctly... what is the issue exactly, do you have problems listing the nodes in de custom section, or displaying the info on the frontend?
a) Your products are stored in a database structure out side of the normal Umbraco structure and you are trying to access this data within XSLT by using a custom XSLT extension?
b) Your products are within the normal content section of Umbraco and you want to know how to access them?
If it's (a) you will need to write an XSLT extension that returns a XPathNodeIterator that then enables you to access that data within XSLT
If the answer is (b) you will need to go from the $currentPage up to the root level in XSL and then find the product section to be able to iterate through your products.
If you can give us some more information I am sure we can help you.
creating a getxmlnodebyid alike function for custom section.
Hello again.
I've created a custom section with some products and categories in it. Now i want to list these products like i can list normal content nodes.
Ive got a xslt extension set up where i can get the data but i have no way to get like the product name and product size then placing them apart where i want.
So how do i do this?
Hmm, not sure if I understand that correctly... what is the issue exactly, do you have problems listing the nodes in de custom section, or displaying the info on the frontend?
Cheers,
/Dirk
I want to list my products from custom section in the frontend with a xslt macro.
I have a xslt function and i want to know how i woud create a function for listing em out. I'm guessing some xml output but i feel a bit lost.
All ive done so far is a function where i can just return a products name by its id so i know the extension is working.
Hi Johan,
Are you:
a) Your products are stored in a database structure out side of the normal Umbraco structure and you are trying to access this data within XSLT by using a custom XSLT extension?
b) Your products are within the normal content section of Umbraco and you want to know how to access them?
If it's (a) you will need to write an XSLT extension that returns a XPathNodeIterator that then enables you to access that data within XSLT
If the answer is (b) you will need to go from the $currentPage up to the root level in XSL and then find the product section to be able to iterate through your products.
If you can give us some more information I am sure we can help you.
Best regards,
Chris
Its (a)
Is there anywhere i can read more about the xPathNodeIterator or any good examples i can have a look at?
A wiki article on using xslt extension, returning an XPathNodeIterator and use in your xslt can be found here.
Hope this helps.
Regards,
/Dirk
is working on a reply...