Post (Tiles) Element - Add button with link (not working)

Hey,

I’ve been trying to use the new Posts Element (Tiles).
I removed the link from the “Post” box and tried adding a button with a new link in the article area but that button doesn’t have the link I set up for it when checking the frontend.

Is something like this possible or does the link have to be set on the Post with the whole area being clickable?

Hello @PhilTone,

Thanks for writing to us.

No, it is not possible since the Posts Element (Tiles) content are randing inside an anchor tag and it not allowed add multiple anchor tags inside it. It is not allowed according to the W3C Markup Validation rules.

Thanks for understanding.
Take care.

Ok, thx for clearing that up!

Hey, @PhilTone! Thanks for writing in and I just wanted to chime in for a moment to clear up a couple points of confusion here. While @prakash_s is correct that an anchor being placed inside an anchor is invalid markup, we actually have a system operating behind the scenes in this release that will remove any anchor tags from nested Elements that might inadvertently use them. This is to help users avoid getting “non-compliant” markup errors in validators if they unknowingly nested something improperly. All that being said, we do recommend that you shoot for using proper Elements in their proper place from the start.

Additionally, I wanted to point out that with this release, every Layout Element in the builder (Sections, Rows, Columns, Grids, Cells, and Divs) can change their wrapping tag using the Tag control found in the Setup control group when inspecting that Element (below is an Example screenshot from a Section):

01

Within this tag list is the ability to set an <a> or Anchor tag, which is how we link between pages on websites. If the tag is set to <a> in this control, a Link control group will appear, allowing you to specify the href for that <a>, effectively making the whole Layout Element clickable:

You can definitely un-assign the anchor from the “Post” Element if you wish, and then move it to another Element or add another Element (like a button) if that is what you desire. The Posts Elements are meant to be very flexible and allow you to move markup around as you see fit as they’re just like working with regular Elements! This means that you’re not “locked in” to anything you see in the Element when you drag it in, it’s really just a starting point for you to either use, or modify as you see fit. Hopefully that helps to clear things up a bit!

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.