I have a Home node. Under the home node i have a Blogs node and under Blogs i have a Blog node (so Blogs contains a list and Blog is a single blog).
I add an XSLT by Document Type (standard XSLT that comes with Umbraco) and change the Doc type to "blog" and add this macro to the Home page template so the blogs list displays on the home page - but nothing displays.
I change it to "blogs" and i get the Blogs link (not the title etc as i would have expected).
Have in mind that Bharani's answer should work, but it's the slowest of all methods.
It should be fine if you are not loading everything (or a large number of descendants) and you have something like Take(7) in the end but if you're loading thousands it will be slow.
Get Nodes/Pages by Document type
I have a Home node. Under the home node i have a Blogs node and under Blogs i have a Blog node (so Blogs contains a list and Blog is a single blog).
I add an XSLT by Document Type (standard XSLT that comes with Umbraco) and change the Doc type to "blog" and add this macro to the Home page template so the blogs list displays on the home page - but nothing displays.
I change it to "blogs" and i get the Blogs link (not the title etc as i would have expected).
How could i list the blogs on the homepage?
Hi J,
I would do this to display a list of blog nodes,
assuming the document type aliases are "blogs" and "blog" respectively.
Have in mind that Bharani's answer should work, but it's the slowest of all methods.
It should be fine if you are not loading everything (or a large number of descendants) and you have something like
Take(7)
in the end but if you're loading thousands it will be slow.is working on a reply...