This project is read-only.

Title for Links List

Topics: Developer Forum
Nov 25, 2007 at 11:23 PM
It seems that the title for the Links List (in fact all section controls) are fixed in the stringres resource files.

Can anyone suggest an easy way of adding a Title value to override the string held in the resx file, or changing the title of a specific link list at runtime.

Regards

J5
Nov 26, 2007 at 5:37 PM

j5alive wrote:
It seems that the title for the Links List (in fact all section controls) are fixed in the stringres resource files.

Can anyone suggest an easy way of adding a Title value to override the string held in the resx file, or changing the title of a specific link list at runtime.

Regards

J5


To answer my own question - as a really dirty solution override render. I'd still like any suggestions for updating the section control to onclude a title for the links objects that SideBar would use rather than the setting in stringres.

protected override void Render(HtmlTextWriter writer)
{
System.IO.StringWriter str = new System.IO.StringWriter();
HtmlTextWriter wrt = new HtmlTextWriter(str);
base.Render(wrt);
wrt.Close();
string html = str.ToString();
html = html.Replace("<h2>News List</h2>", "<h2>Headlines</h2>");
html = html.Replace("<h2>Links</h2>", "<h2>RSS Feeds</h2>");
html = html.Replace("<html", "<html lang="+ _website.LocaleID);
// write the new html to the page
writer.Write(html);
}