Important Notice from AspDotNetStorefront
It is with dismay that we report that we have been forced, through the action of hackers, to shut off write-access to this forum. We are keen to leave the wealth of material available to you for research. We have opened a new forum from which our community of users can seek help, support and advice from us and from each other. To post a new question to our community, please visit: http://forums.vortx.com
Results 1 to 3 of 3

Thread: Check Xml package name in template

  1. #1
    Exanthos is offline Junior Member
    Join Date
    Jun 2009
    Posts
    7

    Default Check Xml package name in template

    How in the master template can I check what xml pacakge is used for that particular page?

  2. #2
    BFG 9000 is offline Senior Member
    Join Date
    Oct 2006
    Location
    South UK
    Posts
    882

    Default

    Not sure exactly what you mean?

    The template can call multiple xmlpackages...


    TTFN

    BFG

  3. #3
    Exanthos is offline Junior Member
    Join Date
    Jun 2009
    Posts
    7

    Default

    We managed to do it, we needed to add into the master template an if statement to check what xml package a category was using.

    If anyone needs this we added a method to ShowEntityPage.cs

    Code:
    public string GetXmlPackageName()
            {
                m_EntityInstanceID = CommonLogic.QueryStringUSInt(m_EntityHelper.GetEntitySpecs.m_EntityName + "ID");
                n = m_EntityHelper.m_TblMgr.SetContext(m_EntityInstanceID);
                m_XmlPackage = Vortx.MobileFramework.MobileXmlPackageController.XmlPackageHook(m_EntityHelper.m_TblMgr.CurrentField(n, "XmlPackage").ToLowerInvariant(), m_SkinBase.ThisCustomer);
                return m_XmlPackage;
            }
    We can the call this method in the master template

    Code:
    <% AspDotNetStorefront.SkinBase skinBase = new AspDotNetStorefront.SkinBase();%>  
                            <% AspDotNetStorefront.ShowEntityPage SEP = new AspDotNetStorefront.ShowEntityPage(EntityDefinitions.readonly_CategoryEntitySpecs, skinBase); %>
                            <% string xmlPackageName = SEP.GetXmlPackageName(); %>