CMS Development

cinanoglu
Participant | Diamond Partner
Participant | Diamond Partner

HubL If Statements

SOLVE

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

0 Upvotes
2 Accepted solutions
MFrankJohnson
Solution
Thought Leader

HubL If Statements

SOLVE


2000px-Ok_sign_font_awesomeDoes 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?

 

share-on-Linkedin-Button-75x19.png 


hubspot-forum-signature-badge-v01.png

www.MFrankJohnson.com

 

Please include @MFrankJohnson in your message if you'd like me to reply.

 

Note: Please search for recent posts as HubSpot evolves to be the #1 CRM platform of choice world-wide.

 

Hope that helps.

 

Be well,
Frank


www.mfrankjohnson.com

View solution in original post

0 Upvotes
MFrankJohnson
Solution
Thought Leader

HubL If Statements

SOLVE

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

 

Note: Please search for recent posts as HubSpot evolves to be the #1 CRM platform of choice world-wide.

 

Hope that helps.

 

Be well,
Frank


www.mfrankjohnson.com

View solution in original post

0 Upvotes
5 Replies 5
MFrankJohnson
Solution
Thought Leader

HubL If Statements

SOLVE


2000px-Ok_sign_font_awesomeDoes 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?

 

share-on-Linkedin-Button-75x19.png 


hubspot-forum-signature-badge-v01.png

www.MFrankJohnson.com

 

Please include @MFrankJohnson in your message if you'd like me to reply.

 

Note: Please search for recent posts as HubSpot evolves to be the #1 CRM platform of choice world-wide.

 

Hope that helps.

 

Be well,
Frank


www.mfrankjohnson.com
0 Upvotes
cinanoglu
Participant | Diamond Partner
Participant | Diamond Partner

HubL If Statements

SOLVE

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!

0 Upvotes
MFrankJohnson
Solution
Thought Leader

HubL If Statements

SOLVE

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

 

Note: Please search for recent posts as HubSpot evolves to be the #1 CRM platform of choice world-wide.

 

Hope that helps.

 

Be well,
Frank


www.mfrankjohnson.com
0 Upvotes
cinanoglu
Participant | Diamond Partner
Participant | Diamond Partner

HubL If Statements

SOLVE

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!

MFrankJohnson
Thought Leader

HubL If Statements

SOLVE

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

 

Note: Please search for recent posts as HubSpot evolves to be the #1 CRM platform of choice world-wide.

 

Hope that helps.

 

Be well,
Frank


www.mfrankjohnson.com