> ## 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](/cms/reference/hubl/functions) 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](/cms/reference/hubl/filters#format-datetime).
</Warning>

<Tabs sync={false}>
  <Tab title="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>

  <Tab title="Output">
    ```html theme={null}
    October 17, 2020 October 1, 2020 4 PM October 1, 2020 9 AM octubre 1, 2020 9
    a.m.
    ```
  </Tab>
</Tabs>

### format\_currency

<Warning>
  This function has been replaced by [format\_currency\_value](/cms/reference/hubl/filters#format-currency-value).
</Warning>

<Tabs sync={false}>
  <Tab title="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>

  <Tab title="Output">
    ```html theme={null}
    $100<br />
    100 $<br />
    ￥ 100
    ```
  </Tab>
</Tabs>

## 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()**](/cms/reference/hubl/functions#content-by-id).
</Warning>

<Tabs sync={false}>
  <Tab title="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>

  <Tab title="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>
    ```
  </Tab>
</Tabs>

### blog\_topics

<Warning>
  This function has been renamed to [**blog\_tags()**](/cms/reference/hubl/functions#blog-tags).
</Warning>

<Tabs sync={false}>
  <Tab title="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>

  <Tab title="Output">
    ```html theme={null}
    [Insider]

    <ul>
    <li><a href="https://www.ajlaporte.dev/blog/tag/insider">Insider</a></li>
    </ul>
    ```
  </Tab>
</Tabs>

### blog\_recent\_topic\_posts

<Warning>
  This function has been renamed to [blog\_recent\_tag\_posts()](/cms/reference/hubl/functions#blog-recent-tag-posts).
</Warning>

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

### datetimeformat (function)

<Warning>
  This function has been replaced by [format\_datetime()](/cms/reference/hubl/functions#format-datetime).
</Warning>

<Tabs sync={false}>
  <Tab title="HubL">
    ```jinja theme={null}
    {{ datetimeformat(content.publish_date_local_time, "%B %e, %Y") }}
    ```
  </Tab>

  <Tab title="Output">
    ```html theme={null}
    February 27, 2020
    ```
  </Tab>
</Tabs>

### get\_public\_template\_url

<Warning>
  This function has been replaced by [**get\_asset\_url()**](/cms/reference/hubl/functions#get-asset-url).
</Warning>

<Tabs sync={false}>
  <Tab title="HubL">
    ```jinja theme={null}
    {{ get_public_template_url("custom/page/Designers_2015/designer-doc-2105.js") }}
    ```
  </Tab>

  <Tab title="Output">
    ```html theme={null}
    //cdn2.hubspot.net/hub/327485/hub_generated/style_manager/1431479563436/custom/page/Designers_2015/designer-doc-2105.min.html
    ```
  </Tab>
</Tabs>

### include\_css

<Warning>
  This function has been replaced by [**require\_css()**](/cms/reference/hubl/functions#require-css).
</Warning>

<Tabs sync={false}>
  <Tab title="HubL">
    ```jinja theme={null}
    {{ include_css("custom/page/Designers_2015/designers-doc-2015.css")  }}
    ```
  </Tab>

  <Tab title="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"
    />
    ```
  </Tab>
</Tabs>

### include\_javascript

<Warning>
  This function has been replaced by [**require\_js()**](/cms/reference/hubl/functions#require-js).
</Warning>

<Tabs sync={false}>
  <Tab title="HubL">
    ```jinja theme={null}
    {{ include_javascript("custom/page/Designers_2015/designer-doc-2105.js") }}
    ```
  </Tab>

  <Tab title="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>
    ```
  </Tab>
</Tabs>

### page\_by\_id

<Warning>
  This function has been replaced by [**content\_by\_id()**](/cms/reference/hubl/functions#content-by-id).
</Warning>

<Tabs sync={false}>
  <Tab title="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>

  <Tab title="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>
    ```
  </Tab>
</Tabs>
