Question on wrapping items with an a tag
Permalink Browser Info Environment
Hi-
I am trying to create a block with the following markup (so the href, image and card title are editable.
Is it possible to open the a tag, set the href, then have the two spans using the "Image" and "Text Area" inside before closing the a tag?
I've tried using both the "Link" item and "URL" item and the closing a tag is always placed before the two spans.
Thanks,
Nathan
I am trying to create a block with the following markup (so the href, image and card title are editable.
<div class="card"> <a href="/linkpath"> <span class="Image"><img alt="" src="//via.placeholder.com/550x400" /></span> <span class="Text">Card Title</span> </a> </div>
Is it possible to open the a tag, set the href, then have the two spans using the "Image" and "Text Area" inside before closing the a tag?
I've tried using both the "Link" item and "URL" item and the closing a tag is always placed before the two spans.
Thanks,
Nathan
Type: | Discussion |
---|---|
Status: | Resolved |
This is very edge case. Best thing would be to make a new field type for this I guess, since the current setup will not be able to do this. If you split this up into multiple (3) fields, it will not work either since if you don't enter a link (href), the others shouldn't show up too.
Not sure if you are familiar with creating Field Types for Block Designer? There is detailed instructions about it here:https://www.concrete5.org/marketplace/addons/block-designer/create-y...
Kind regards,
Ramon