Portal Engine
Version 3.x > Portal Engine > RSS name View modes: 
User avatar
Member
Member
Richard Pearce - 5/26/2008 6:40:49 PM
   
RSS name
I've managed to get most of the blogs functions working but I can't see where to adjust a simple setting. When someone subscribes to the RSS feed, their feed reader displays the blog as "Blog RSS". Where can I change this setting?

User avatar
Member
Member
Darren - 5/27/2008 11:25:26 AM
   
RE:RSS name
If you open the feed's .aspx page (kept in 'CMSPages' by default I think), you can amend the title and the description by amending the text between those tags.

User avatar
Member
Member
ralph - 6/4/2008 4:12:48 PM
   
RE:RSS name
Has anybody managed to make the blog title dynamic (= name of blog)?

Thanks

User avatar
Member
Member
kentico_vitaja - 6/23/2008 9:55:51 AM
   
RE:RSS name
Hi,

You might want to try to modify BlogRss.aspx as follows:
<title><%=mTitle%></title>

Then you need to set mTitle in code behind:
public string mTitle = "";

To get title of your Blog try to use this:
TreeNode BlogHelper.GetParentBlog();

I hope this makes sense and it will help you.

Best regards,
Vita Janecek

User avatar
Member
Member
ralph - 8/8/2008 5:13:38 PM
   
RE:RSS name
Mmmh. But somehow you have to tell the BlogRSS.aspx page, what document ID you are pointing from, no?

GetParentBlog seems to need a int as argument.

How do I get this integer to the file?

Thanks
ralph

User avatar
Kentico Consulting
Kentico Consulting
kentico_mirekr - 8/11/2008 7:21:08 AM
   
RE:RSS name
Hello,

Could you please try the following code to identify the Blog:

CMS.TreeEngine.TreeNode node = null;
CMS.TreeEngine.TreeProvider tree = new MS.TreeEngine.TreeProvider();
node = tree.SelectSingleNode("CorporateSite", "/Blogs/My-blog-1", "en-us");
this.mTitle = node.GetValue("BlogName").ToString();

Best Regards,
Miroslav Remias.

User avatar
Member
Member
ralph - 9/22/2008 5:31:01 PM
   
RE:RSS name
Thanks

Is there a better way to retrive the cultureCode that could be used in your example then this:

string cultureClass = CMS.CMSHelper.CMSContext.GetCultureClass();
string cultureLanguage = cultureClass.Substring(0,2);
string cultureCountry = cultureClass.Substring(2,2);

string cultureCode = cultureLanguage + "-" + cultureCountry;

Thanks
ralph

User avatar
Kentico Support
Kentico Support
kentico_jurajo - 9/23/2008 2:42:50 AM
   
RE:RSS name
Hi Ralph,

Could you please try to use something like this: CMS.CMSHelper.CMSContext.CurrentDocument.DocumentCulture ?

Best Regards,
Juraj Ondrus

User avatar
Member
Member
ralph - 9/23/2008 9:13:05 AM
   
RE:RSS name
WORKS!

I updated my BlogRSS page, so it will display dynamically the Blog Title and uses the meta description as the description that is shown i.e. in Firefox.

It looks like this now:

// CULTURE CODE
string cultureCode = CMS.CMSHelper.CMSContext.CurrentDocument.DocumentCulture;

// SITE NAME
string siteName = CMSContext.CurrentSite.SiteName;

// BLOG TITLE
CMS.TreeEngine.TreeNode node = null;
CMS.TreeEngine.TreeProvider tree = new CMS.TreeEngine.TreeProvider();
node = tree.SelectSingleNode(siteName, blogAliasPath, cultureCode);
this.mTitle = node.GetValue("BlogName").ToString();

// DESCRIPTION : USE META DESCRIPTION
this.mDescription = CMSContext.CurrentDescription;

***************************

The aspx file has been updated as well:

<title><%= mTitle %></title>
<link>.....</link>
<description><![CDATA[<%= mDescription %>]]></description>


***************************

You might consider adding this change to the next version of Kentico....

ciao
ralph

User avatar
Member
Member
jwhelan-jcwhelan - 12/6/2008 5:21:34 PM
   
RE:RSS name
We are looking to display the CMSContext.CurrentDescription information in an exitabletext webpart that displays in the header. How can we use the <% = mDescription %> in this web part. What do we modify in the master page or template to do this?

Thank you

User avatar
Kentico Support
Kentico Support
kentico_jurajo - 12/8/2008 6:29:49 AM
   
RE:RSS name
Hi,

I assume you want to display the page description which is added to the Metadata section in the document Properties tab.

If yes, and you want to display in inside some editable region on your page, you need to create custom macro - http://www.kentico.com/docs/devguide/appendix_a___macro_expressions.htm like following:

switch (expression.ToLower())
{
case "documentdescription":
match = true;
result = CMS.CMSHelper.CMSContext.CurrentPageInfo.GetValue("DocumentPageDescription").ToString();

break;
}

Second option is to use a repeater web part with transformation and inside the transformation you can use Eval("DocumentPageDescription").

Best Regards,
Juraj Ondrus