Hi there
I have an issue about XSLT. In my CMS it is posible to create a new article, and choose an image to be shown on that article. When an image is choosen, there will automatically be created a thumbnail of the image as well.
If we say that the uploaded image is called: image.jpg then the thumbnail will automatically be named image_thumbnail.jpg
I would now like to use the thumbnail image, everywhere on the website, where the article is mentioned, except on the article it self (where the original big image will be shown).
But how can I do that?
I imaging it as if I could get the original name of the image, and then split it up before the .jpg (or .png, .jpeg etc.) and hardcode
_thumbnail
after the name. Hope you get my point. I want to take the complete filename, and cut it into two parts, så that i can insert '_thumbnail' between the two parts.
Maybe that would work, but what if there will be uploaded an image called image.2horses.jpg(a file with more than one dot in the filename), then it wouldn't work to cut it before the '.'
Is there a way to get around this? Maybe by cutting the filename up before the last 4(.jpg .png etc.) og 5 (.jpeg) characters?