I have done that, on one of the shops I'm currently setting up. It really depends on the design you are going to implement
I created a Document Type for each specific type of product and in my case the changes in design could be done in the same xslt for all products. I would check the "name()" of the product and write different information depending on what type I was dealing with.
If your design is very different between each product type you might need a different xslt per product. That would'nt be very difficult, just a lot of work :)
Custom Products implementation
Looking at implementing a shop with multiple types of products with their own properties.
Would this require myself to write my own scripts to output the product information? i.e. productList.xslt and product.xslt
Currently have a document type setup as follows
Product
> Drink
> Food
> Clothes
Hi Sean,
I have done that, on one of the shops I'm currently setting up. It really depends on the design you are going to implement
I created a Document Type for each specific type of product and in my case the changes in design could be done in the same xslt for all products. I would check the "name()" of the product and write different information depending on what type I was dealing with.
If your design is very different between each product type you might need a different xslt per product. That would'nt be very difficult, just a lot of work :)
/Rune
As a quick example, could I edit productList.xslt and producct.xslt as follows
=== productList.xslt ===
<xsl:template match="/">
<div id="products" class="productList">
<xsl:apply-templates select="$currentPage/Product" />
<xsl:apply-templates select="$currentPage/Wine" />
</div>
</xsl:template>
=== product.xslt ===
<xsl:template match="/">
<xsl:apply-templates select="$currentPage [name() = 'Product']" />
<xsl:apply-templates select="$currentPage [name() = 'Wine']" />
</xsl:template>
Hi Sean,
Yes, you could do something like that, but i believe et would be easier eand prettier to do it like this in the product.xslt:
=== product.xslt ===
<xsl:template match="/">
<xsl:apply-templates select="$currentPage" />
</xsl:template>
<xsl:template match="Product">
<!-- Your code -->
</xsl:template>
<xsl:template match="Wine">
<!-- Your code -->
</xsl:template>
is working on a reply...