ZenphotoCMS Forum
html link in custom data field - Printable Version

+- ZenphotoCMS Forum (https://forum.zenphoto.org)
+-- Forum: Support (https://forum.zenphoto.org/forum-1.html)
+--- Forum: General support (https://forum.zenphoto.org/forum-4.html)
+--- Thread: html link in custom data field (/thread-11237.html)



html link in custom data field - harootun - 03-08-2013

I'm sure this question has been asked before but I couldn't find the answer on the site. I have some text in the custom data field for an image that I'm including in image.php, but the links I put into the text aren't working - they aren't live links. I read about how you have to allow tags in the options to get this to work, but I'm not quite understanding how to do this. I tried putting

href => ()

into that field, but that's probably wrong. Can someone offer me advice on how to get links working in the custom data field?

Thanks so much!




html link in custom data field - fretzl - 03-08-2013

If the "Allowed tags" are set to default the first line should read
a => (href =>() title =>() target=>() class=>() id=>())




html link in custom data field - harootun - 03-08-2013

Wow. Talk about a speedy response! Thanks so much!




html link in custom data field - fretzl - 03-08-2013

I guess you're right actually. Just tested it and a link in the "Custom data" field gets rendered as
http://www.site.org/albumname/link
So it looks for an image with the name "link" in the album in which the image with the custom data resides.

EDIT:
After some refreshes the link renders as
http://www.site.org/link




html link in custom data field - acrylian - 04-08-2013

Actually a custom field should behave like another textarea field. You can even enable TinyMCE on it, there is a config file for that available.




html link in custom data field - fretzl - 04-08-2013

Ah, found it.
External links used in custom data fields and codeblocks need to be prefixed with http://




html link in custom data field - acrylian - 04-08-2013

Of course it would be no valid url without :-)