Ok guys, I love aspdotnetstorefront, but I really think it's quite lame to not include much about this pesky little guy, especially because it's an important part of our pages. When you look it up on the forum you get a vagily generic - "Well you could modify the sql to..." or "You can modify it here..." but never a real answer. So I'm here today to tell you it's quite easy.
Of coarse every site/developer works somewhat differently, but I chose to use the package attribute "displayname" (note: all lower case) from where I'll pull my Section Title/BreadCrumb from for custom pages that are built from XmlPackages.
Code:
<package displayname="My Section Title" version="2.1" debug="false" allowengine="true" includeentityhelper="true">
xslt/xml child attributes here.....
</package>
If your package doesn't have this attribute, no sweat, just add it.
Next, make sure you are invoking the Section Title in your skin "template.aspx" - which is "(!SECTION_TITLE!)" - with no quotations. It needs to be where you want the section title listed.
Next, open up "App_Code/SkinBase.cs" in a text editor (perferably VS).
Find this line:
Code:
s = s.Replace("(!SECTION_TITLE!)", SectionTitle);
Replace it with this:
Code:
string backupSectionTitle = "";
try
{
XmlPackage2 x = new XmlPackage2(CommonLogic.QueryStringCanBeDangerousContent("XmlPackage"));
if (x.DisplayName.Length > 0)
{
backupSectionTitle = x.DisplayName;
}
}
catch (Exception err)
{
}
s = s.Replace("(!SECTION_TITLE!)", (SectionTitle.Length > 0 ? SectionTitle : backupSectionTitle));
Reload or Recompile and you're done!
Easiest and most profound mod I've ever done.
K-BL