Changing the path of an image using custom rules

JUSTIN@MINDVISION.CO.UK , February 06 2020, 19:36
February 06 2020, 19:36 #9
I have installed the module and have it working well. Thank you for a great module.
I have an issue though where I am trying to adjust the path of an image because it's not correct
the image name is being pulled from the custom field properly and is rendering properly on the page.
The issue is that it needs the source to show the directory location.
I.E. it's showing src="/cdec971ea2_sueryder.png" where it should be src="images/volunteering/cdec971ea2_sueryder.png"
I have tried adding custom rules but it's not changing anything
Any ideas?
marco 85
February 07 2020, 06:46 #10
Hi Justin
first of all, thank you! Glad to hear you like my module.
Can you please tell me where you are using this image customfield inside Exposer? Is it inside the Grid Cards, List, Slideshow or the Modal? If its inside a Modal, did you are using Customfield 1 or 2 Section?
Edit: during the testing i noticed a bug in the slideshow (the wrong field is used) i will fix this bug with the next update. Unfortunately I cannot (yet) reproduce the problem on the basis of your description.
kind regards
February 07 2020, 08:56 #11
Hi Marco
Yes, it's excellent, thank you. I think that using the custom fields gives Joomla massive potential so having a module that uses them is great.
The image issue is happening on the grid cards (also on others when I tested).
I have included a screen shot below for the custom rules.
(74.78 KiB)
24 Downloads/Views
marco 85
February 07 2020, 12:14 #12
the custom rules are not working that way so when you have an image it will do the following in the sourcecode:
/images/volunteering/< img src="yourimage.ext" ... >
it simply adds the string in front of the image tag and does not change the src tag value...
can you please tell / show me the Customfield configuration inside the article? (as in my first screenshot above)
all my tests where successfull so exposer took always the image as "imagepath as is" inside the fieldvalue.
another thing: I have updated the debug Mode in the meantime. Can you please download the new version from your Profile Page (after that you got Version 1.1.12) and enable Debug Mode & Warnings in the Advanced Settings of the module. Then i can better verify what happens.
please let me know when you have done the update and enabled debug that i can have a look...
thank you
February 10 2020, 12:20 #13
Hi Marco
OK, I see. It places this code in a different place. The issue is that the custom field only takes the code placed into it. in my case it's just the file name. Would be great if it could place the path inside too.
OK, I have just realised that I should have mentioned that I am using 'Advanced Custom Fields'. I should try and swap it for a native Joomla Custom Filed instead.
(108.64 KiB)
13 Downloads/Views
marco 85
February 11 2020, 07:50 #14
ah i see yes, so the "path" is saved inside another key in this cutomfield type (uploadfolder) and the value / rawvalue just holds the filename....
i have to think about a practicable way for exposer to be more flexible in such cases...
Important is: We have Exposer just checked with the native customfields.