Get Blog Name w/o Link

rated by 0 users
This post has 3 Replies | 3 Followers

Not Ranked
Posts 4
Points 65
bruce Posted: Mon, Mar 26 2007 2:19 PM

Hi All

I need to get the blogs name without the hyperlink data added to it.
I know that

<asp:HyperLink CssClass="headermaintitle" id="BlogTitle" runat="server" />

 returns a correctly formatted link, but I need just the name portion.

I've found where the link is created in the controls, but there is no direct access to just the name portion.

Any help is appreciated

Thanks

Bruce




 

Not Ranked
Posts 4
Points 65
bruce replied on Mon, Mar 26 2007 2:42 PM

Okay, here's a quick and dirty soultion using javascript

I'm still looking for a more CS based answer if anyone has one.

var blogName = '<asp:HyperLink CssClass="headermaintitle" id="BlogTitle" runat="server" />'
var iStart   = String(blogName).indexOf('>')
var iEnd    = String(blogName).indexOf('<',iStart)
blogName = blogName.substring(iStart+1,iEnd);

 Thanks
Bruce

 

  • | Post Points: 20
Top 25 Contributor
Posts 2,243
Points 44,805
CS Developers

For name, do you mean "THE_NAME" in site.com/blogs/THE_NAME/about.aspx?

Quick and dirty, on a blog page would be <%= CSContext.Current.ApplicationKey %>.
 
Thanks,
Scott
 

  • | Post Points: 5
Not Ranked
Posts 31
Points 485
Yama replied on Wed, May 2 2007 9:57 PM

Hi,

I am assuming you are using the CS 2.1 version still right? In the newest version, CS 20007, you can using get the name as follow:

In your Theme theme.Master file:

          Get the Name:  <CSBlog:WeblogData runat="server" Property="Name" />
          Get the Description:  <CSBlog:WeblogData runat="server" Property="Description"  />

Hope this helps,

Yama

Yama
Page 1 of 1 (4 items) | RSS
Powered by Community Server (Commercial Edition), by Telligent Systems

Copyright© 2008 Telligent Systems Inc. All rights reserved
CommunityServer.com  •  Telligent.com