Hello everyone,
Is there a HubL if statement that would display content based on the URL. What I’m trying to accomplish is having a dynamic content section in the sidebar. I’d like to know if there is another way to do this as well.
Thank you for the help!
Cenker

Does my post help answer your question?
Help the Community by marking it as SOLVED
Q: Is there a HubL if statement that would display content based on the URL?
Short A: see Solved: Display information based on url factors?


www.MFrankJohnson.com
Please include @MFrankJohnson in your message if you’d like me to reply.
Hello @MFrankJohnson,
Thanks for sharing the thread.
I’m still confused about how to use this statement;
{% if request.query_dict.utm_campaign == “something” %}
Let’s say I have a campaign called “Smart Content”, what should I change “something” with?
Thank you!
Hey @cinanoglu,
Here are a couple more resources that should clear it up for you …
- see Personalization based on query string data
- see HTTP request variables
You’ll have more success on the HubSpot Developers Forum for Hubl questions like these.
Hope that helps.
Best,
Frank
Hello @MFrankJohnson,
Thank you so much! I modified the code with;
{% if request.path == “/xxx” %} and it works just fine.
Have a great rest of your day!
Excellent @cinanoglu. Gotta say, that’s a lot easier than anything I’ve ever done in WordPress or .js! haha
Thanks for circling back with your success story. It helps others see value in the HubSpot Community.
Best,
Frank