I'm trying to display dynamic content based on which page is currently loaded. This code is inside Blogger's theme HTML (creating my custom theme).
<b:if expr:cond='data:blog.url == data:blog.homepageUrl + "p/blog.html">
<b:section id='blog-content' name='Blog content'>
<b:widget id='Blog1' locked='true' title='Blog Posts' type='Blog'/>
</b:section>
</b:if>
However, even when navigating to the myblog.blogspot.com/p/blog.html
(NOTE: blog address changed) this condition is not met and nothing is shown (I've tried displaying <h1>This is blog</h1>
).
I've tried printing out contents of data:blog.url
and data:blog.homepageUrl
using
<b:eval expr='data:blog.url'><br/>
<b:eval expr='data:blog.homepageUrl + "p/blog.html"'/><br/>
These returned identical strings.
When replacing ... == data:blog.homepageUrl + "p/blog.html">
to ... == myblog.blogspot.com/p/blog.html
(NOTE: blog address changed), i. e., not using stored blog URL but hard-coding expected address, the check seems to pass and blog content is displayed.
Anyone else encountered the problem or might know a solution to this problem?
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…