{post-title} in RSS Autodiscovery links cause layouts issues in WebPreview and WebLayout RRS feed

  • Question

  • I'm trying to add suport for WebLayout and WebPreview views.  The approach I'm using to do this is to detect when live writer is requesting the weblayout or webpreview, and then rendering the post page for a fake post - which as {post-title} as the title and {post-body} as the body. 

    The issue I'm facing is the post page has some logic to automatically add a link to a comments rss feed into the header for RSS auto discover.  It includes the post title in the title of the RSS link, and having the {post-title} token in the rss header link causes Live Writer to display part of the raw html at the top of hte page - ="{post-title} Comments (RSS 2.0)" rel="alternate" type="application/rss+xml" href="/commentrss.ashx">
    I have simplified my markup down to the following.  Removing line 4 removes the issue, adding line 4 back causes the issue again..

    <HTML lang="en" xml:lang="en" xmlns="http://www.w3.org/1999/xhtml">
        <TITLE>{post-title} - Test</TITLE>
        <LINK title="{post-title} Comments (RSS 2.0)" rel="alternate" type="application/rss+xml" href="/commentrss.ashx">
    Sunday, July 19, 2009 10:27 AM

All replies

  • Do you need line 4 in your blog template?  It seems like it wouldn't be needed for your template for Writer.
    -Brandon Turner [MSFT]
    Tuesday, July 21, 2009 9:07 PM
  • Removing it is going to be difficult - I'm essentially returning the same html as you get when viewing a full blog post in a browser if there was an actual blog post with the title {post-title} and body {post-body}.  The intent being that no matter how much I change the layout of my blog page I will never have to touch the WebPreview layout, and the WebLayout should only require minor changes in a custom CSS file to change hide all elements, and then only show the elements of importance for hte WebLayout layout.

    Tuesday, July 21, 2009 9:15 PM