Developer forum

Forum » Templates » Product group fields in xslt

Product group fields in xslt

Filip Lundby
Reply
In the backend I've got some checkboxes in the product group ("Varegruppefelter"). In my xslt i need to determine if one of these are checked or not. How would i do that?

I've tried the follwing to find some data. But couldn't get any useful data out of it - and not sure what I am looking for.
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

<xsl:variable name="availableloops" select="'Groups,Products,GroupFields,CustomGroupFields,CustomFieldList'" />
<xsl:output method="xml" omit-xml-declaration="yes" indent="yes"  encoding="utf-8" />
<xsl:param name="html-content-type" />

<xsl:template match="Page">

  <textarea>
    <xsl:copy-of select="." />
  </textarea>
    
</xsl:template>

</xsl:stylesheet>

Help appreciated :)

Replies

 
Vladimir
Reply
Hi Filip!
The standard dw xml for eCom groups contained only fixed number of elements. For example:
<Page SmallImage="" LargeImage="" Icon="" MenuText="Varegruppefelter" 
MouseOver="" Image="" ImageActive="" ImageMouseOver="" Allowclick="True" 
ShowInSitemap="True" Href="Default.aspx?ID=3935&amp;GroupID=GROUP5" 
FriendlyHref="shop.aspx?ID=3935&amp;GroupID=GROUP5" Title="Varegruppefelter" 
RelativeLevel="2" Sort="2" LastInLevel="True" ChildCount="0" class="L2" 
NavigationTag="" ID="3935" AreaID="1" InPath="False" Active="False" AbsoluteLevel="2" />

 In your xslt you can operate only with these attributes. But you can implement custom NavigationProvider for ecom groups that will renders the value of your checkboxes in xml.

Best regards,
Vladimir

 
Filip Lundby
Reply
Hi Vladimir, that's sad. But thanks anyway.
 
Imar Spaanjaars Dynamicweb Employee
Imar Spaanjaars
Reply
Hi Filip,

For a detailed examination of implementing your own NavigationProvider, take a look here:

http://devierkoeden.com/articles/extending-the-sitemap-with-dynamicweb-content.aspx
http://devierkoeden.com/articles/extending-the-google-sitemap-feature-with-custom-content.aspx

The first article shows the concept in detail, while the second one show how to implement your own NavigationItem classes to enrich the XML that is generated.

Hope this helps

Imar
 
Filip Lundby
Reply

Thanks Imar :)

 

You must be logged in to post in the forum