Liquid - Add content conditonally by URL

In BC I’m currently loading some content conditionally based on current page URL, eg.
{% if globals.get.id == “/thisisthepage” %}
add this code

Q: How can I achieve this in Treepl?
Im guessing its the globals.get.id needs to be changed to whatever returns the URL in Treepl.

Q: Is there a reference page showing the differences between BC and Treepl with regards to things like this?

Hi @Reagan_Vautier. Here’s a reference page for common BC/Treepl conversions:
https://docs.treepl.co/documentation_group/bc-migration-guides/bc-liquid-comparisons#secSystem

1 Like

@Reagan_Vautier like this:

{% if request.request_url.path == ‘/thisurl’ %}

Best reference for Globals’s like tags is to create a test page, add this:

<pre>{{request}}</pre>

(globals)

1 Like