Print field within href="" without <div>

SOLVE
Occasional Contributor

Hi there, I created a custom module which contains a text field called 'url' I'd like to print this field within an `href` but hubspot's <div> gets printed inside breaking the html.

My markup looks like 

<a class="mt-auto" href="{% inline_text field="url" value="{{ item.url }}" %}" target="_blank">Read More</a>

 

How can I achieve this?

Reply
0 Upvotes
1 Accepted solution

Accepted Solutions
Solution
Regular Advisor

Hi Maxim, 

 

You might find this thread helpful, it recommends using text instead of inline-text. 

 

However, if you're working within a custom module I'd recommend using the "Fields" option on the left-hand side to insert fields:

 

text-field.png

 

In this case, using {{ module.text_field }} or {{ item.text_field }} in a repeater (in this case I've left the default name "text field") should just print the text with no additional markup.

 

I hope that helps!

 


Stephanie O'Gay Garcia

HubSpot Design / Development

Website | Contact

 

If this helped, please mark it as the solution to your question, thanks!

View solution in original post

2 Replies 2
Solution
Regular Advisor

Hi Maxim, 

 

You might find this thread helpful, it recommends using text instead of inline-text. 

 

However, if you're working within a custom module I'd recommend using the "Fields" option on the left-hand side to insert fields:

 

text-field.png

 

In this case, using {{ module.text_field }} or {{ item.text_field }} in a repeater (in this case I've left the default name "text field") should just print the text with no additional markup.

 

I hope that helps!

 


Stephanie O'Gay Garcia

HubSpot Design / Development

Website | Contact

 

If this helped, please mark it as the solution to your question, thanks!

View solution in original post

Occasional Contributor

Amazing, that worked! Thanks @Stephanie-OG 

Reply
0 Upvotes