Dynamically change color of xml sitemap titles
-
Hi everyone! I have a sitemap.xml that contains my links to the various sub pages. What I would like to do is have the system change the color of some of the titles so they stick out when new content is released. I've tried simply adding <code><span style="font-color:red">(new!)</span></code> in the xml file but that always bombs out. Can this be done? The only other way I could think of pulling it off would be dynamically checking all of the sitemap nodes for "(new!)" somewhere in the title and then adding the span block while the page is loading. Thanks!
Knowledge is not power, however, the acquisition and appropriate application of knowledge can make you a very powerful individual.
-
Hi everyone! I have a sitemap.xml that contains my links to the various sub pages. What I would like to do is have the system change the color of some of the titles so they stick out when new content is released. I've tried simply adding <code><span style="font-color:red">(new!)</span></code> in the xml file but that always bombs out. Can this be done? The only other way I could think of pulling it off would be dynamically checking all of the sitemap nodes for "(new!)" somewhere in the title and then adding the span block while the page is loading. Thanks!
Knowledge is not power, however, the acquisition and appropriate application of knowledge can make you a very powerful individual.
If anyone runs into this, I figured out how to pull it off using the ItemDataBound event.
protected void Menu1\_MenuItemDataBound(object sender, MenuEventArgs e) { if (e.Item.Text.Contains("(NEW!)")) { e.Item.Text = e.Item.Text.Replace("(NEW!)","<span style=\\"color:red\\">(NEW!)</span>"); } }
Knowledge is not power, however, the acquisition and appropriate application of knowledge can make you a very powerful individual.