i wanted to make a news page on wich i could see just 100 characters of the post and then had to click on the title to read on. i found the Umbraco Creative Website Starter - 2.0.2 and it had just what i wanted. now when i copied the xslt and changed the part from wheren it should get the html in the xslt, it didnt work.. so i changed the for each and it now shows the date and title of the article but not the 100 chars of the article itself.. soo my question was .. whats wrong with it?.. i guess it is in the part that tries to strip the html and then truncates it..
I just re-read your code, and I can see that there's a small problem with the <xsl:choose> you use when rendering the date as well. You might want to change that code to this:
i'll try it out right now! weirdly enough i literally coppied this from the umbraco creative website starter .. so that package must have it wrong too then right?
You shall remove the current()/ from the code and replace it with name()/. The reason why there's shown a date, is because it's the code inside the otherwise that's shown, because the first test will never be true due to the wrong code. So it's the creation date that's shown, and not the date in the eventDate property.
umbraco news items text isnt found (CWS)
Hey!
i wanted to make a news page on wich i could see just 100 characters of the post and then had to click on the title to read on. i found the Umbraco Creative Website Starter - 2.0.2 and it had just what i wanted. now when i copied the xslt and changed the part from wheren it should get the html in the xslt, it didnt work.. so i changed the for each and it now shows the date and title of the article but not the 100 chars of the article itself.. soo my question was .. whats wrong with it?.. i guess it is in the part that tries to strip the html and then truncates it..
thanks in advance!
heres my xslt:
Hi Stef
I think you have mixed some of the legacy XML schema syntax into your XSLT code in the copy/paste phase. So you probably need to change this:
to this:
/Kim A
I just re-read your code, and I can see that there's a small problem with the <xsl:choose> you use when rendering the date as well. You might want to change that code to this:
/Kim A
thanks!
i'll try it out right now! weirdly enough i literally coppied this from the umbraco creative website starter .. so that package must have it wrong too then right?
i'll let you know if it worked!
Stef
hmm.. i just tried the code you gave me and the date gave the following error:
but i dont think i need this code because the date shows up properly. but...... the article works!!
many many thanks for this because i was really not understanding what was wrong of it.
Stef
Ohh sorry Stef. I was a bit to fast there and forgot to delete a small part of the code. The code should look like this:
You shall remove the current()/ from the code and replace it with name()/. The reason why there's shown a date, is because it's the code inside the otherwise that's shown, because the first test will never be true due to the wrong code. So it's the creation date that's shown, and not the date in the eventDate property.
/Kim A
is working on a reply...