The (!SECTION_TITLE!) token does not fire in Parser like the other tokens...it's only parsed when the breadcrumb exists in the skin itself (the token gets replaced in the App_Code/SkinBase.cs(.vb) file). What you would need to do for this to display in an xmlpackage is create a custom extension function (this prevents you from needing to modify the core logic and recompile). Then retrieve the page from the HTTPContext, cast it SkinBase, and retrieve the SectionTitle property. Here's the full code (as written in version 8.0.1.2):
App_Code/CustomExtensions.cs
Code:
using System.Web;
using System.Web.UI;
using AspDotNetStorefrontCore;
using System.Collections.Generic;
using AspDotNetStorefront;
public class CustomExtensions : XSLTExtensionBase
{
#region Constructor
/// <summary>
/// CustomExtensions Constructor
/// </summary>
public CustomExtensions()
: this(null, 1, null)
{
}
public CustomExtensions(Customer cust, int SkinID, Dictionary<string, EntityHelper> EntityHelpers)
: base(cust, SkinID)
{
}
#endregion
public string GetSectionTitle()
{
Page p = HttpContext.Current.Handler as Page;
return (p as SkinBase).SectionTitle;
}
}
web.config (new code in red)
Code:
<xsltobjects defaultExtension="">
<extensions>
<clear />
<add name="receipt" namespace="urn:receipt" type="ReceiptXsltExtension, app_code"></add>
<add name="custom" namespace="urn:custom" type="CustomExtensions, app_code"></add>
</extensions>
</xsltobjects>
Your xmlpackage where you need to use your custom extension functions
Code:
...
...
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:aspdnsf="urn:aspdnsf" xmlns:custom="urn:custom" exclude-result-prefixes="aspdnsf custom" >
...
...
<xsl:value-of select="custom:GetSectionTitle()" disable-output-escaping="yes"/>