I inherited this project from a colleuge, and I'm very bad with XSLT , I wonder is there any obvious mistake with this code. Here is the layout of pagination : The blue scribble is there to hide the logo, anyways the logo loads as the default but I can't load the real article image.
Thanks for such a fast and nice welcome :) The site is running Umbraco 7.1.8, here you can see that i selected an image for this test article Dennis's code dosen't work, here is the template code http://pastebin.com/tjxnwKe6 Here is the News item document type
Sicnce you are using Umbraco 7.1.8, then I assume that you are using the new XML schema, it was introduced in Umbraco 4.5. Then you need to write you XSLT code a bit different.
Ah this is frustrating, can't get it to work. I think it's the older version of xslt because i get errors when i use the code from the new one , I also made sure that the alias is correct, and i even added another field just to be sure. When i open the article ( press read more ) i can see the image as a header but i need this small version next to the summarized text, thanks for your help guys :)
I don't think that's possible. Since the release of v7.1.x it has not been possible to activate the legacy xml schema. So I would be very surprised if it was.
What kind of errors are you getting? Keep in mind that it's not sure the examples provided in here are correct either. It would also be nice to see all of your code to fully grasp the context.
Could you please try going to the /app_data/logs file and see if you can find the error text there? I'm suspecting that there should be a line number somewhere, which might have been cropped from the top in the image you have posted above.
The issue might be that XSLT support changed a bit with the release of v7.1 so some things might need to be done a bit differently...If I recall correctly some things are stored in a different way in the /App_Data/umbraco.config file.
Hmm, actually there is no trace of the error you're seeing in your XSLT file in there.
Some of it is just INFO stuff, that you most times don't need to care about. Not quite sure what could be wrong with your code - The screendump you posted above...was it cropped or is that the full error you're getting when trying to save your XSLT?
Have you tried to edit it outside of the Umbraco editor?
I just get this Error reading XSLT file: \xslt\PaginationExample.xslt, I used the last code you provided me the only problem is the image not loading on the article summaries page, everything else is fine
Ok, as long as you found a way to move forward. If it had been on a v4 or v6 installation I don't think it would have been so troublesome. With v7 it's probably better to go with Razor if you're not that familiar with XSLT.
Can't load article image, always loads default one
Here is the code:
http://pastebin.com/AmPsewxG
I inherited this project from a colleuge, and I'm very bad with XSLT , I wonder is there any obvious mistake with this code. Here is the layout of pagination :
The blue scribble is there to hide the logo, anyways the logo loads as the default but I can't load the real article image.
Hi sandro and welcome to our.
I think that this code should do it for you
Hope this helps,
/Dennis
Hi Sandro and welcome to our :)
Judging from the XSLT syntax I guess your site is running Umbraco 4.0.x - Is that correct?
Has there been selected an image on the articles where the default logo is just loaded instead?
/Jan
Thanks for such a fast and nice welcome :)
The site is running Umbraco 7.1.8, here you can see that i selected an image for this test article
Dennis's code dosen't work, here is the template code
http://pastebin.com/tjxnwKe6
Here is the News item document type
Hi Sandro,
Sicnce you are using Umbraco 7.1.8, then I assume that you are using the new XML schema, it was introduced in Umbraco 4.5. Then you need to write you XSLT code a bit different.
And make sure that the alias for the image field is articlePhoto, the name and alias are to different things. You can find the documentation for the getMedia in XSLT here: https://our.umbraco.org/wiki/reference/umbracolibrary/getmedia
Hope this helps,
/Dennis
Ah this is frustrating, can't get it to work. I think it's the older version of xslt because i get errors when i use the code from the new one , I also made sure that the alias is correct, and i even added another field just to be sure. When i open the article ( press read more ) i can see the image as a header but i need this small version next to the summarized text, thanks for your help guys :)
Hi Sandro
I don't think that's possible. Since the release of v7.1.x it has not been possible to activate the legacy xml schema. So I would be very surprised if it was.
What kind of errors are you getting? Keep in mind that it's not sure the examples provided in here are correct either. It would also be nice to see all of your code to fully grasp the context.
Looking forward to hearing from you.
/Jan
http://pastebin.com/FThDkppU
Here is the whole xslt file
http://pastebin.com/tjxnwKe6
Here is the template code
The alias for the image is articlePhoto
Hi sandro,
Try this one, and make sure that the alias is of the image field is image. Try to see where to find the alias of the field http://umbraco.tv/videos/umbraco-v7/implementor/fundamentals/document-types/properties/
Hope this helps,
/Dennis
Hi Sandro
What does the error messages you're getting say?
/Jan
This is the error message
Hi Sandro
Could you please try going to the /app_data/logs file and see if you can find the error text there? I'm suspecting that there should be a line number somewhere, which might have been cropped from the top in the image you have posted above.
The issue might be that XSLT support changed a bit with the release of v7.1 so some things might need to be done a bit differently...If I recall correctly some things are stored in a different way in the /App_Data/umbraco.config file.
/Jan
http://pastebin.com/WcHSt1De
Here is the last log, at the end there seems to be problem with page node
Hi Sandro
Hmm, actually there is no trace of the error you're seeing in your XSLT file in there.
Some of it is just INFO stuff, that you most times don't need to care about. Not quite sure what could be wrong with your code - The screendump you posted above...was it cropped or is that the full error you're getting when trying to save your XSLT?
Have you tried to edit it outside of the Umbraco editor?
/Jan
I just get this Error reading XSLT file: \xslt\PaginationExample.xslt, I used the last code you provided me
the only problem is the image not loading on the article summaries page, everything else is fine
I decided to give up on XSLT and rewrite the paging in razor .. much easier :D
Hi Sandro
Ok, as long as you found a way to move forward. If it had been on a v4 or v6 installation I don't think it would have been so troublesome. With v7 it's probably better to go with Razor if you're not that familiar with XSLT.
Happy coding!
/Jan
is working on a reply...