@{ /* RSS FEED */ } @using System.Linq @using System.Xml.Linq @using umbraco.MacroEngines @using uBlogsy.Common.Extensions @using uBlogsy.Common.Helpers @using uBlogsy.BusinessLogic @{ // get all posts // get tag, category, or author from query string var tag = Request.QueryString["tag"]; var category = Request.QueryString["category"]; var author = Request.QueryString["author"]; var searchTerm = Request.QueryString["search"]; var commenter = Request.QueryString["commenter"];
uBlogsyRSS : category rss
hello..
Using ublogsy we can create Rss feed for category with following url
http://test.mydomain.org.gall.arvixe.com/blog/rss?category=Website+Updates
This works fine. but when we click on post title in feed, it doesnot show page. Actually link url become as follows and so not showing page.
http://test.mydomain.org.gall.arvixe.com/blog/rss/blog/2012/march/e-cards-on-website/ .
It should be http://test.mydomain.org.gall.arvixe.com/blog/2012/march/e-cards-on-website/ ;
here is uBlogsyRSS.cstml ...
@{
/* RSS FEED */
}
@using System.Linq
@using System.Xml.Linq
@using umbraco.MacroEngines
@using uBlogsy.Common.Extensions
@using uBlogsy.Common.Helpers
@using uBlogsy.BusinessLogic
@{
// get all posts
// get tag, category, or author from query string
var tag = Request.QueryString["tag"];
var category = Request.QueryString["category"];
var author = Request.QueryString["author"];
var searchTerm = Request.QueryString["search"];
var commenter = Request.QueryString["commenter"];
IEnumerable<DynamicNode> posts = PostService.Instance.GetPosts(Model.Id, tag, category, author, searchTerm, commenter, 0, int.MaxValue);
string lastPubDate;
if (posts.Count() == 0)
{
lastPubDate = DateTime.Now.ToString();
}
else
{
lastPubDate = posts.FirstOrDefault().GetProperty("uBlogsyPostDate").Value;
}
// get landing page
var landing = DataService.Instance.GetLanding(Model.Id);
string qs = Request.QueryString.ToString();
// get blog url
string blogUrl = Request.Url.AbsoluteUri.Replace(Model.NiceUrl(), string.Empty).TrimEnd("/".ToCharArray());
if (!string.IsNullOrWhiteSpace(qs))
{
blogUrl = blogUrl.Replace(qs, string.Empty).Replace("?", string.Empty);
}
<rss version="2.0">
<channel>
<title>@landing.uBlogsyRssTitle</title>
<description>@landing.uBlogsyRssDescription</description>
<copyright>@landing.uBlogsyRssCopyright</copyright>
@*<image>@landing.uBlogsyRssImage</image>*@
<link>@blogUrl</link>
<lastBuildDate>@lastPubDate.FormatDateTime("ddd, dd MMMM yyyy HH:mm:ss")</lastBuildDate>
<pubDate>@lastPubDate.FormatDateTime("ddd, dd MMMM yyyy HH:mm:ss")</pubDate>
@foreach (var p in posts)
{
<item>
<title>@p.GetProperty("uBlogsyContentTitle").Value</title>
<author>@p.GetProperty("uBlogsyPostAuthor").Value</author>
<comments>@blogUrl@p.Url</comments>
<description>@p.GetProperty("uBlogsyContentBody").Value.StripHtml().Trim()</description>
<link>@blogUrl@p.Url</link>
<guid>@blogUrl@p.Url</guid>
<pubDate>@p.GetProperty("uBlogsyPostDate").Value.FormatDateTime("ddd, dd MMMM yyyy HH:mm:ss") </pubDate>
</item>
}
</channel>
</rss>
}
So, what is wrong in this?
Strange
I cant replicate this. Try deleting your /app_data/umbraco.config then republish.
Although I did notice a related issue...
replace
With
var qs = Request.QueryString.ToString().Replace("+", "%20");
hello...
everything was proper.. it was just that I was using rss instead of rss/ in url
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.