Oct 15, 2020
How to exclude sidebar based on url
In particular I'd like to hide the aside / sidebar-container based on a url parameter that is present, for example myblog.com/p/mypage.html?sidebar=hide
Note I'm not looking to use display:none as that still loads all of the aside content from the template adding to page load time and extra bulk. I'm looking to exclude it from the template section code based on a string contains (or similar) condition.
For example, I'd love to be able to use something like <b: if cond= to exclude a section from the template, BUT in my case I need something like <b: if cond CONTAINS mystring ( the key difference being the use of CONTAINS instead of = )
I've been looking for an answer to this for months off and on with no replies on how to do it.
Thank you if you can help.
Community content may not be verified or up-to-date. Learn more.
All Replies (7)