# Convert 'inline\_text field' to URL Slug

**URL:** <https://community.hubspot.com/t/convert-inline-text-field-to-url-slug/9909>\
**Category:** CMS Development\
**Created:** [August 21, 2018, 7:50am UTC](https://community.hubspot.com/t/convert-inline-text-field-to-url-slug/9909 "2018-08-21T07:50:53Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![FloStu](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/flostu/32/32521_2.png) [@FloStu](https://community.hubspot.com/u/FloStu)\
**Post date:** [August 21, 2018, 7:50am UTC](https://community.hubspot.com/t/convert-inline-text-field-to-url-slug/9909/1 "2018-08-21T07:50:53Z")

</div>

Hi,

it is possible to convert a ‘inline\_text’-field to a SEO url slug within the widget module?

I want to create anchor links from a text.

`<div id="{% inline_text field="anchor_pillar_page" value="{{ module.anchor_pillar_page }}" %}">`

text = Lorem ipsum Dolor?

slug= lorem-ipsum-dolor

Thanks

Flo

---

<div class="post-metadata">

**Author:** ![tjoyce](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/tjoyce/32/88832_2.png) [@tjoyce](https://community.hubspot.com/u/tjoyce)\
**Post date:** [August 21, 2018, 11:47am UTC](https://community.hubspot.com/t/convert-inline-text-field-to-url-slug/9909/2 "2018-08-21T11:47:26Z")

</div>

@FloStu - I think you want to do something like this, text will be easier to work with than inline\_text, if you add the export\_to\_template\_context attribute:

```auto
{% text "anchor_text" value="add pillar name here" export_to_template_context="true" %}
<div id="{{widget_data.anchor_text.value|lower|replace(' ','-')}}">

```

* * *

If this answer helped, please, mark as solved 😄

* * *

[tim@belch.io](mailto:tim@belch.io) | [forms.belch.io](https://forms.belch.io) | Design your own Beautiful HubSpot Forms; No coding necessary.

Drop by and say Hi to me [on slack](http://slack.belch.io/).

---

<div class="post-metadata">

**Author:** ![Rachel-Marvel](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/rachel-marvel/32/89259_2.png) [@Rachel-Marvel](https://community.hubspot.com/u/Rachel-Marvel)\
**Post date:** [August 21, 2018, 2:53pm UTC](https://community.hubspot.com/t/convert-inline-text-field-to-url-slug/9909/3 "2018-08-21T14:53:32Z")

</div>

Hey Tim,  
Thanks a lot for your help. Can I just confirm that I should:  
1) create a text field in the module

2) inside the \<a/\> tag add the

`id={{widget_data.anchor_text.value|lower|replace(' ','-')}}" `

3) and wrap it in the

`{% text "anchor_text" value="add pillar name here" export_to_template_context="true" %}`

? 🙂

---

<div class="post-metadata">

**Author:** ![Rachel-Marvel](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/rachel-marvel/32/89259_2.png) [@Rachel-Marvel](https://community.hubspot.com/u/Rachel-Marvel)\
**Post date:** [August 22, 2018, 11:31am UTC](https://community.hubspot.com/t/convert-inline-text-field-to-url-slug/9909/4 "2018-08-22T11:31:33Z")

</div>

Finally got thsi to work - Thanks Tim for setting me on the right path.  
I created a text field in my component. added the

`{% text "anchor_text" value="add pillar name here" export_to_template_context="true" %}`

just above my anchor tag. Then inside the anchor tag, I referenced the text field which contains my url eg

` <a href="{{ module.link_url }}"/>`

That’s it 😄

---

<div class="post-metadata">

**Author:** ![tjoyce](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/tjoyce/32/88832_2.png) [@tjoyce](https://community.hubspot.com/u/tjoyce)\
**Post date:** [August 22, 2018, 12:31pm UTC](https://community.hubspot.com/t/convert-inline-text-field-to-url-slug/9909/5 "2018-08-22T12:31:25Z")

</div>

@Rachel-Marvel - awesome, I did comment on your original question if you haven’t seen the answer there.

---

<div class="post-metadata">

**Author:** ![Rachel-Marvel](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/rachel-marvel/32/89259_2.png) [@Rachel-Marvel](https://community.hubspot.com/u/Rachel-Marvel)\
**Post date:** [August 22, 2018, 3:41pm UTC](https://community.hubspot.com/t/convert-inline-text-field-to-url-slug/9909/6 "2018-08-22T15:41:00Z")

</div>

yeah it was great - the only change I needed to make was to use module.name.value rather than widget\_date.name.value - this may help others too 🙂
