How to compare URL data to check current page URL in Blogger template.
The raw propery of a URL data returns a string type data that you can use to perform strings operation (comparsion, concatenation).
data:{URL_object}.rawFor example, if you want to customize a certain page with an exact URL:
<b:if cond='data:view.url.raw contains "/p/labels.html"'>
Display something only on labels page.
</b:if>URL comparison is especially useful to safeguard template features that are tied to a specific origin. For example, if you've customized the template and that feature is mean to be used by your blog alone, then you should wrap the feature code with a simple URL check like so:
<b:if cond='data:view.url.raw contains "https://xmlexpr."'>
<!-- feature specific for xmlexpr blog -->
</b:if>This way you can share the template safely without having any connection to the original blog from which the template code is taken.
https://www.blogger.com/rpc_relay.html https://www.blogger.com/comment/frame/220561901913020919?po=3937242957896905827&hl=en&saa=85391&origin=https://xmlexpr.blogspot.com&skin=contempo https://xmlexpr.blogspot.com/2025/10/blogger-url-string-comparison.html#comments true ["template-development"]