Developer forum

Forum » Templates » Ecom.ProductList.NextPage fails

Ecom.ProductList.NextPage fails


Reply
Hi,

I've got at a eCom using xslt productlist templates. When I use the NextPage function I get this error when clicking the next link:

An error occured while attaching module (Dynamicweb.Frontend.Content)

System.Xml.XmlException: The ';' character, hexadecimal value 0x3B, cannot be included in a name.
   at System.Xml.XmlDocument.CheckName(String name)
   at System.Xml.XmlElement..ctor(XmlName name, Boolean empty, XmlDocument doc)
   at System.Xml.XmlDocument.CreateElement(String prefix, String localName, String namespaceURI)
   at System.Xml.XmlDocument.CreateElement(String name)
   at Dynamicweb.Templatev2.TemplateXml.TagsToXml(XmlElement ParentElement, TagCollection tags)
   at Dynamicweb.Templatev2.Template.ParseXML()
   at Dynamicweb.Templatev2.Template.Output()
   at Dynamicweb.eCommerce.Frontend.Renderer.RenderGroups(GroupCollection Groups)
   at Dynamicweb.eCommerce.Frontend.Frontend.EcomRender()
   at Dynamicweb.eCommerce.Frontend.Frontend.GetContent()
   at Dynamicweb.Frontend.Content.getModule(DataRow& ParagraphRow)
  
If I manually change the & in my url to & it loads the next page perfectly... This is a huge BUG!

I've got a site, where I've got 500+ products which needs to be in one group, but now I can't show more than the first 100, because of the 100 items pr. page limit...

What to do?

Replies

 
Reply
It actually seems like the system outputs one to many amp; every time:

<Ecom.ProductList.NextPage>/Default.aspx?ID=620&amp;amp;GroupID=GROUP65&amp;amp;PageNum=2</Ecom.ProductList.NextPage>
 
Nicolai Høeg Pedersen
Reply

Yes - the link is broken in XSLT - it will be bugged.

Untill that, use this piece of code in your xslt:

<xsl:if test="string-length(Ecom.ProductList.NextPage.Clean) != 0">
    <a>
   <xsl:variable name="nextPageLink">
     <xsl:if test="Ecom.ProductList.CurrentPage&lt;=Ecom.ProductList.TotalPages">
    <xsl:value-of select="concat(Ecom.Group.Link.Clean, '&amp;PageNum=', Ecom.ProductList.CurrentPage +1)"/>
     </xsl:if>
   </xsl:variable>

   <xsl:attribute name="href">
     <xsl:value-of select="$nextPageLink"/>
   </xsl:attribute>

   Next
    </a>
  </xsl:if>

 

You must be logged in to post in the forum