Pro 6.0 Beta - Component grid 'button' not using <a>

A bit confusing, but I have created a multi layer ‘button’ grid component, with the grid set to <a> (see screenshots), but the <a> is not being pulled through.

If I add the <a> to the underlying cell that works, so it appears a bug with the grid not pulling in the <a>

deleted my comment.

Ignore me put on strong glasses and see I was incorrect.

1 Like

Haha, no worries… I missed the original comment and now curious

I thought the element was nested inside a column or something you has set as an a tag. In HTML you can’t next a tags.

1 Like

@scotbaston, I think I’m following this correctly. So you have a Grid Element with its HTML tag set to be an <a>, and you’re using that as some sort of anchor for a Slider it seems? I believe that the <a> tag is only output on an Element when you fill in the href value of it as well. While you can technically have an anchor without an href attribute according to the HTML5 spec, we do not personally output it unless the href is filled in just in case a user accidentally selected it.

I use this pattern a lot for sliders I make personally (setting a Div Element to be an <a> to get the cursor). What I tend to do is if the button is a “next” button, I’ll add #next to the href value. If it’s a “previous” button, I’ll add #prev to the href value. This fills in that attribute and allows it to be swapped over to an <a>.

Hopefully that helps / addresses the situation!

Hi kory,

Almost

It is not a slider but a button made from a 2 cell grid. One cell above the other which moves out the way to reveal the content underneath

The whole grid is the a href which is defaulted to # but then picks up dynamic link from a cpt

Putting the same link on the cell rather than the grid works so it’s not a dynamic data issue. It is just the grid that doesn’t like the a record

That’s strange…because when I add the <a> to my Grid Element’s locally and fill out the href, I am seeing the <a> tag show up in my markup. If you just go to your Grid for a moment and “hardcode” a string href value in there to something like http://example.com/, does the <a> tag show up in your markup?

I’ll try that shortly

Sounds good!

tried all that an nothing worked…

but it helped me find my typo that was causing the problem!

All working now, thank you for the assist

@scotbaston, that’s great news! I’ll count this one as sorted.

1 Like