> ## Documentation Index
> Fetch the complete documentation index at: https://developers.hubspot.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

---
id: d3502c8e-e973-4432-b15a-e5a95d525f64
---

# Deprecated HubL functions

> A list of the HubL functions that have been deprecated, and the alternatives you can use.

The following is a list of HubL filters and functions that are deprecated. While these filters and functions still operate as intended, they've been replaced by newer ones that are more streamlined and optimized.

For all new and future projects we encourage using our [current HubL functions](https://developers.hubspot.com/docs/cms/reference/hubl/functions.md) instead of deprecated ones.

## Deprecated filters

The following filters have been deprecated:

* [datetimeformat](#datetimeformat-filter)
* [format\_currency](#format-currency)

### datetimeformat (filter)

> [!WARNING]
>
> This function has been replaced by [format\_datetime](https://developers.hubspot.com/docs/cms/reference/hubl/filters.md#format-datetime).

> [tab] HubL
>
> ```jinja theme={null}
> {{ content.updated|datetimeformat("%B %e, %Y") }}
> {{ content.publish_date|datetimeformat("%B %e, %Y %l %p") }}
> {{ content.publish_date|datetimeformat("%B %e, %Y %l %p", "America/Los_Angeles") }}
> {{ content.publish_date|datetimeformat("%B %e, %Y %l %p", "America/Los_Angeles", "es-US") }}
> ```

> [tab] Output
>
> ```html theme={null}
> October 17, 2020 October 1, 2020 4 PM October 1, 2020 9 AM octubre 1, 2020 9
> a.m.
> ```

### format\_currency

> [!WARNING]
>
> This function has been replaced by [format\_currency\_value](https://developers.hubspot.com/docs/cms/reference/hubl/filters.md#format-currency-value).

> [tab] HubL
>
> ```jinja theme={null}
> {% set price = 100 %}
> {{ price|format_currency("en-US") }}
> {{ price|format_currency("fr-FR") }}
> {{ price|format_currency("jp-JP", "JPY", true) }}
> ```

> [tab] Output
>
> ```html theme={null}
> $100<br />
> 100 $<br />
> ￥ 100
> ```

## Deprecated functions

The following functions have been deprecated:

* [blog\_post\_by\_id](#blog-post-by-id)
* [blog\_topics](#blog-topics)
* [blog\_recent\_topic\_posts](#blog-recent-topic-posts)
* [datetimeformat](#datetimeformat-function)
* [get\_public\_template\_url](#get-public-template-url)
* [include\_css](#include-css)
* [include\_javascript](#include-javascript)
* [page\_by\_id](#page-by-id)

### blog\_post\_by\_id

> [!WARNING]
>
> This function has been replaced by [**content\_by\_id()**](https://developers.hubspot.com/docs/cms/reference/hubl/functions.md#content-by-id).

> [tab] HubL
>
> ```jinja theme={null}
> {% set my_post = blog_post_by_id(4715624297) %}
> <ul>
> <li>
> <a href="{{ my_post.absolute_url }}">{{my_post.title}}</a>
> </li>
> </ul>
> ```

> [tab] Output
>
> ```html theme={null}
> <ul>
> <li>
> <a
> href="//www.hubspot.com/blog/articles/kcs_article/email/how-do-i-create-default-values-for-my-email-personalization-tokens"
> >How do I create default values for my email or smart content
> personalization tokens?</a
> >
> </li>
> </ul>
> ```

### blog\_topics

> [!WARNING]
>
> This function has been renamed to [**blog\_tags()**](https://developers.hubspot.com/docs/cms/reference/hubl/functions.md#blog-tags).

> [tab] HubL
>
> ```jinja theme={null}
> {{ blog_topics("default", 250) }}
>
> {% set my_tags = blog_topics("default", 250) %}
> <ul>
> {% for item in my_tags %}
> <li><a href="{{ blog_tag_url(group.id, item.slug) }}">{{ item }}</a></li>
> {% endfor %}
> </ul>
> ```

> [tab] Output
>
> ```html theme={null}
> [Insider]
>
> <ul>
> <li><a href="https://www.ajlaporte.dev/blog/tag/insider">Insider</a></li>
> </ul>
> ```

### blog\_recent\_topic\_posts

> [!WARNING]
>
> This function has been renamed to [blog\_recent\_tag\_posts()](https://developers.hubspot.com/docs/cms/reference/hubl/functions.md#blog-recent-tag-posts).

```hubl theme={null}
{{ blog_recent_topic_posts("default", "culture", 5) }}
```

### datetimeformat (function)

> [!WARNING]
>
> This function has been replaced by [format\_datetime()](https://developers.hubspot.com/docs/cms/reference/hubl/functions.md#format-datetime).

> [tab] HubL
>
> ```jinja theme={null}
> {{ datetimeformat(content.publish_date_local_time, "%B %e, %Y") }}
> ```

> [tab] Output
>
> ```html theme={null}
> February 27, 2020
> ```

### get\_public\_template\_url

> [!WARNING]
>
> This function has been replaced by [**get\_asset\_url()**](https://developers.hubspot.com/docs/cms/reference/hubl/functions.md#get-asset-url).

> [tab] HubL
>
> ```jinja theme={null}
> {{ get_public_template_url("custom/page/Designers_2015/designer-doc-2105.js") }}
> ```

> [tab] Output
>
> ```html theme={null}
> //cdn2.hubspot.net/hub/327485/hub_generated/style_manager/1431479563436/custom/page/Designers_2015/designer-doc-2105.min.html
> ```

### include\_css

> [!WARNING]
>
> This function has been replaced by [**require\_css()**](https://developers.hubspot.com/docs/cms/reference/hubl/functions.md#require-css).

> [tab] HubL
>
> ```jinja theme={null}
> {{ include_css("custom/page/Designers_2015/designers-doc-2015.css")  }}
> ```

> [tab] Output
>
> ```html theme={null}
> <link
> rel="stylesheet"
> href="https://developers.hubspot.com/docs//cdn2.hubspot.net/hub/327485/hub_generated/style_manager/1431477077901/custom/page/Designers_2015/designers-doc-2015.min.css"
> />
> ```

### include\_javascript

> [!WARNING]
>
> This function has been replaced by [**require\_js()**](https://developers.hubspot.com/docs/cms/reference/hubl/functions.md#require-js).

> [tab] HubL
>
> ```jinja theme={null}
> {{ include_javascript("custom/page/Designers_2015/designer-doc-2105.js") }}
> ```

> [tab] Output
>
> ```html theme={null}
> <script
> type="text/javascript"
> src="//cdn2.hubspot.net/hub/327485/hub_generated/style_manager/1431479563436/custom/page/Designers_2015/designer-doc-2105.min.js"
> ></script>
> ```

### page\_by\_id

> [!WARNING]
>
> This function has been replaced by [**content\_by\_id()**](https://developers.hubspot.com/docs/cms/reference/hubl/functions.md#content-by-id).

> [tab] HubL
>
> ```jinja theme={null}
> {% set my_page = page_by_id(4715624297) %}
>   <ul>
>     <li>
>       <a href="{{ my_page.absolute_url }}">{{ my_page.title }}</a>
>     </li>
>   </ul>
> ```

> [tab] Output
>
> ```html theme={null}
> <ul>
>   <li>
>     <a
>     href="//www.hubspot.com/email/how-do-i-create-default-values-for-my-email-personalization-tokens"
>     >How do I create default values for my email or smart content
>     personalization tokens?</a
>     >
>   </li>
> </ul>
> ```
