I'm new to umbraco ... so this might be a easy thing.
I have some content like this:
Content
* MySite
** News
*** First news
*** Second news
** Contact
The stars in the structure above note the level ...
The news page uses a macro to print the news ... it works great. But when I use the same Template for the "MySite", ofcause it dont work, since it now parses the "News/Contact" as the 2 nodes, instead of "First news/Second news" as the 2 nodes.
So ... other than specify absuloute path in the XLTS file to get the news items, what can I do ?
I want the MySite/News page to be 100% the same ... so other work arounds are also welcome ...
Crate a new XSLT file and take a look at the "List Sub Pages from a Changleable Source" template in the dropdownlist. This wil allow you to specify the nodeid to which to load the "news" from.
Remember to change the_templateID with the actual ID number. Well, I hope this gives you an idea of how it could be solved. And if you don't know anything about XSLT, speak up, and we will find a solution for this as well :)
Its darn late here now so I guess I will return tomorrow when I have tried both suggestions.
Kim: Yes, I want the 2 pages to act like the same page. Atm I'm doing all markup in the XSLT files ... which can't be the best option. I read somewhere you could specify a template to use with the node in the XSLT file ... or do I remember wrong.
I have the following Document types:
News area - where the news list are shown. this could probebly be removed, I'm still learning. But its the document type for the "News"
News item - A news item
News comment
Each got a template ... except "News comment" since it would be odd to display a single comment on a page.
So ... the template_id in the number written in the browsers "status bar" ?
I'm very very newbie at XSLT, but most of the stuff until now I have been able to google :-) but if you got any good resources, please do share them with me :-)
btw. Denmark rox. ( Mostly a comment to Kim Andersen )
Skiltz: Yours are the most easy to implement so for starter I will try yours ... still learning here ... so great with more opinions on every thing.
You'll find the tempalte id when you hover over the template in the Settings-section. when you hover over a template in the list of all your templates, you can see the id in the bottom of your browser, where it says: javascript:openTemplate(1047);
In the above example, 1047 is the tempalte id :)
But you could try out Skiltz's solutions first, and if that works, everything is good :)
Specify default page to be loaded.
Hi,
I'm new to umbraco ... so this might be a easy thing.
I have some content like this:
The stars in the structure above note the level ...
The news page uses a macro to print the news ... it works great. But when I use the same Template for the "MySite", ofcause it dont work, since it now parses the "News/Contact" as the 2 nodes, instead of "First news/Second news" as the 2 nodes.
So ... other than specify absuloute path in the XLTS file to get the news items, what can I do ?
I want the MySite/News page to be 100% the same ... so other work arounds are also welcome ...
Crate a new XSLT file and take a look at the "List Sub Pages from a Changleable Source" template in the dropdownlist. This wil allow you to specify the nodeid to which to load the "news" from.
So actually you want to list all news items on your site, on "MySite" and "News", right?
If that is what you want, you can with XSLT, show all items with a certain template. I guess that all of your news-nodes have a special template?
If this is what you want you can use this XSLT:
Remember to change the_templateID with the actual ID number. Well, I hope this gives you an idea of how it could be solved. And if you don't know anything about XSLT, speak up, and we will find a solution for this as well :)
Hi,
2 possible solutions ...
Its darn late here now so I guess I will return tomorrow when I have tried both suggestions.
Kim: Yes, I want the 2 pages to act like the same page.
Atm I'm doing all markup in the XSLT files ... which can't be the best option. I read somewhere you could specify a template to use with the node in the XSLT file ... or do I remember wrong.
I have the following Document types:
Each got a template ... except "News comment" since it would be odd to display a single comment on a page.
So ... the template_id in the number written in the browsers "status bar" ?
I'm very very newbie at XSLT, but most of the stuff until now I have been able to google :-) but if you got any good resources, please do share them with me :-)
btw. Denmark rox. ( Mostly a comment to Kim Andersen )
Skiltz:
Yours are the most easy to implement so for starter I will try yours ... still learning here ... so great with more opinions on every thing.
Thanks both.
Hi Mikael
You'll find the tempalte id when you hover over the template in the Settings-section. when you hover over a template in the list of all your templates, you can see the id in the bottom of your browser, where it says: javascript:openTemplate(1047);
In the above example, 1047 is the tempalte id :)
But you could try out Skiltz's solutions first, and if that works, everything is good :)
Used the template answer for it. Seemed like the best option.
I would have marked both as an option, but its not possible to. I can't mark an answer as helpful, cause I dont have enough karma yet.
mvh
is working on a reply...