CMS Development

narmstrong
Contributor | Platinum Partner
Contributor | Platinum Partner

Is there a Hubl Click event or alternative

SOLVE

Hello,

I want to populate the blog_recent_copy_posts function with a dynamic value. Is there a click event in hubl or a work around to do this.

For example if I have some buttons that have the id of different topic.slugs is there a way to populate the function on click?

{% set topic_posts = blog_recent_topic_posts('default', 'the_clicked_id', 5) %}

 

 

Noah Armstrong | TSL Marketing
Senior Developer
6085 Marshalee Dr| Suite 100 | Elkridge, MD 21075
Contact Us

TSL Marketing
1 Accepted solution
Jsum
Solution
Key Advisor

Is there a Hubl Click event or alternative

SOLVE

@narmstrong,

 

The page has to reload. 

 

That's ok though. Create javascript on click function that changes the window.location to the page url plus a query:

 

https://www.website.com?blog_topic=topic1

 

create a variable for the query and set the variable as the dynamic piece of your blog function. 

View solution in original post

0 Upvotes
1 Reply 1
Jsum
Solution
Key Advisor

Is there a Hubl Click event or alternative

SOLVE

@narmstrong,

 

The page has to reload. 

 

That's ok though. Create javascript on click function that changes the window.location to the page url plus a query:

 

https://www.website.com?blog_topic=topic1

 

create a variable for the query and set the variable as the dynamic piece of your blog function. 

0 Upvotes