Forum
How do I return the name of an image without the path or suffix?
I have a page attribute declared allowing the user to specify a 'Featured Image'. I wish to use the name of the image in a navigation template.
I'm using the following tag:
<perch:pages id="pageImage"/>
Currently returns the image and the full path, filename and suffix:
/perch/resources/image-name.jpg
What I would like is:
image-name
No path, no suffix.
Is this possible?
You would need to get the path into a variable, and then get the name out with a bit of PHP string manipulation.
Thanks Rachel.