CMS Development

tm_anthony
Participant

Post Filter Expand Link Not Working

SOLVE

I am using a post_filter module in a template file, and the 'see all' expand link text is working, but the link is broken. The href on the link is pointing to '#' (see one of the attached images). I didn't see a property in the documentation that I could use to set the link for the expand text, so what needs to be done to fix this? See my screenshot of the HubL I am using. Thank you!

 

See all link pointing to #See all link pointing to #HubL module callHubL module call

0 Upvotes
1 Accepted solution
Jsum
Solution
Key Advisor

Post Filter Expand Link Not Working

SOLVE

@tm_anthony,

 

The "see all" link shows when the the amount of topics availabe exceeds the number you set to max_links.

 

The href value for the "see all" link is set to #. When you click the link it should not take you to a new page, it should reveal the rest of the topics beyond your max_link limit. 

 

The javascript function that makes this work lives in a file, called public_common.js, in your Hubspot portal.

 

This file should be included on your page through the standard footer includes token that is required in both your coded files and your builder templates. 

 

If the file exists in your template and the "see all" link isn't working then a script that you have added to your template is interfering with the public_common.js script. You should check your console (ctl + shift + i | cmd + option + i) for errors. You can also remove any javascript files that you have attached to your template temporarily and click the "see all" link to see if doing so triggers the drop down.

View solution in original post

0 Upvotes
4 Replies 4
Jsum
Solution
Key Advisor

Post Filter Expand Link Not Working

SOLVE

@tm_anthony,

 

The "see all" link shows when the the amount of topics availabe exceeds the number you set to max_links.

 

The href value for the "see all" link is set to #. When you click the link it should not take you to a new page, it should reveal the rest of the topics beyond your max_link limit. 

 

The javascript function that makes this work lives in a file, called public_common.js, in your Hubspot portal.

 

This file should be included on your page through the standard footer includes token that is required in both your coded files and your builder templates. 

 

If the file exists in your template and the "see all" link isn't working then a script that you have added to your template is interfering with the public_common.js script. You should check your console (ctl + shift + i | cmd + option + i) for errors. You can also remove any javascript files that you have attached to your template temporarily and click the "see all" link to see if doing so triggers the drop down.

0 Upvotes
tm_anthony
Participant

Post Filter Expand Link Not Working

SOLVE

Thank you for your response! The public_commons.js file is showing up in the inspector when I am on that page, so I will try taking out JS files as there are no errors in the log. I will let you know if I'm able to deduce the issue by doing this.

0 Upvotes
Jsum
Key Advisor

Post Filter Expand Link Not Working

SOLVE

I forgot to mention that this is also dependent on Hubspots default css. If there are no errors in your console then maybe the css is missing.

0 Upvotes
tm_anthony
Participant

Post Filter Expand Link Not Working

SOLVE

After a little more digging and testing, I was able to find a conflict with my JS that was breaking the Hubspot JS. I had a jquery selector that was targeting anchor tags with an href of #. Thanks for pointing me in the right direction!