开发者

How do I reference the theme folder in blogengine.net?

开发者 https://www.devze.com 2023-03-16 06:45 出处:网络
I have a theme in blog engine.net I want to reference a .aspx file in an IFRAME in my theme master page (inside site.master). Something 开发者_运维百科like this:

I have a theme in blog engine.net I want to reference a .aspx file in an IFRAME in my theme master page (inside site.master). Something 开发者_运维百科like this:

<iframe src='/blog/themes/MCO/ContactForm.aspx' frameborder='0' width='250' height='75'></iframe>

Unfortunately this absolute path doesn't work. Is there some sort of helper function to get this reference? Like:

src='<%=BlogSettings.Instance.ThemeFolder+"ContactForm.aspx" %>'


Try this one:

<img src="themes/<%=BlogSettings.Instance.Theme%>/images/logo.png" />


*iframe src='/blog/themes/MCO/ContactForm.aspx'*

Why not try the full path url?


The above marked good answer actually works only on the blog home page. This one should improve:

<img src="<%=Utils.ApplicationRelativeWebRoot %>themes/<%=BlogSettings.Instance.Theme%>/images/logo.png" />
0

精彩评论

暂无评论...
验证码 换一张
取 消