SOLVED: Basic text as dynamic data get's styling removed after "Link to" applied

Hello @robertobze,

thank you for the email and access. I think the issue is with the way you style different categories.
You style them with attributes. For example, the one where the styling works, it looks like this:

But if we check the one where it does not work, you can see that you have both categories inside. I suppose you are using wrond/different dynamic tag, and the correct one to use inside the attributes would be {term_name}, just like you use it for text.

Can you check that?

Matej.

1 Like

you are a rockstar my man ! thanks so much . Sorry for making things complicated - I learn as I go! appreciate you.

Hey, perfect. I’m happy that it works now :slight_smile:

Now, I would actually suggest changing this to {term_slug} or {term_id}, not relying on the name. Because the name can change, but you probably will not change the slug.
And even more importantly, if you have a category with special characters inside the name, it may break the HTML, so I strongly recommend one of the other two options :wink:

Matej

1 Like

thanks - I tried both but neither worked like {term_name} so I’ll stick with this for now, I can survive this one! lol.

One more question, Matej:

How can I best approach this?

Ideally, what I would have wanted was the terms showing up in a div that I can use flex on, so show the badges side by side and still be able to position the div where the badges are now. However, each term_name outputs inside a div and so when I am using absolute positioning I am now getting the issue where they stack over each other.

You will need to wrap them with another div, and set the absolute position on that one. Then it will work, even if you have multiple ones :slight_smile:

1 Like

yep - worked perfectly as well. Thanks again Matej!!

1 Like

Hey Matej,

On a different site, I used the {term_name} and it’s outputting empty. Screenshot:

this is on the latest release of Bricks…

Hi @robertobze,

what’s the loop? You are looping posts, right? For {term_name} to work, you have to loop over terms. So you will have to add inner query loop, that will loop over terms, and you will be able to output them.

Let me know :slight_smile:
Matej

1 Like

that was it - I got it to work/display as desired, I just hope what I did is semantically correct:

thanks a ton!!

1 Like