I think you could be right.I thinkyourxsltfilelooks a littleadvancedout,in relation toyour structure. IfI understand itcorrectlysoliveyournewsitems on thenewsoverview.
With this code you should be able to the the node name out of all the news item. It takes the subpage below the currentpage. so if you put the macro on the news-overview you should get the unordered list a link to the news item and the node name.
<xsl:param name="currentPage"/> <xsl:template match="/"> <!-- The fun starts here --> <ul> <xsl:for-each select="$currentPage/News [@isDoc and string(umbracoNaviHide) != '1']"> <li> <a href="{umbraco.library:NiceUrl(@id)}"> <xsl:value-of select="@nodeName"/> </a> </li> </xsl:for-each> </ul> </xsl:template>
I made a new xslt from scrath and put your code in there, and that seems to work. It can find all 3 news. So I though it would help to put the for-each in the other xslt, but that did not help anything. So something is still wrong with my calling of the properties. Any idea how to call them then?
This last part is for making a link work, and I am not sure if actually works.
This is how it looks right now, I might change it for better overview later on. But that should be easy to change in the code. Is that enough info, or do you need more to help me?
Most of my problem I solved, but I still have a problem with getting links to work. It's just a general problem with all my xslt files, so I think opens a new subjects.
Take properties from childs
Hallo everyone
I think this is an easy question, but now I have used quite a lot of this day to get it to work, and just wont work. My content area looks like this:
Any idea how to solve this problem?
Hi Matias,
I will try to help you.
I think you are almost there, from the top of my mind I just think you are missing ./ when you are call those properties.
So the newsdate should be called like this.
Intead of this one, if I rember right.
I hope this can help you futher.
/Dennis
Hey Dennis
Thanks for you help, unfortently it did not do anything different. Nothing still shows up.
I am not sure if the mistake is placed in the way of calling each property, or if it more in the way that the for-each is pointing towards each news.
Hi Matias,
I think you could be right.I think your xslt file looks a little advanced out, in relation to your structure.
If I understand it correctly so live your news items on the news overview.
With this code you should be able to the the node name out of all the news item. It takes the subpage below the currentpage. so if you put the macro on the news-overview you should get the unordered list a link to the news item and the node name.
I will try to help you as much as I can.
/Dennis
I made a new xslt from scrath and put your code in there, and that seems to work. It can find all 3 news. So I though it would help to put the for-each in the other xslt, but that did not help anything. So something is still wrong with my calling of the properties. Any idea how to call them then?
This last part is for making a link work, and I am not sure if actually works.
Hi Matias,
Is it possible that you can take a screenshot of news document type, so I can see which properties you have attached to it, and what those properties alias.
I think this will make it easier to help you with a code that works.
I took a screenshot of the test site so you are on what I mean.
In my case the document type is SubPage. But on this document type I have these properties.
/Dennis
This is how it looks right now, I might change it for better overview later on. But that should be easy to change in the code. Is that enough info, or do you need more to help me?
Most of my problem I solved, but I still have a problem with getting links to work. It's just a general problem with all my xslt files, so I think opens a new subjects.
Thanks a lot for your help!
is working on a reply...