Custom Layout XSL issue
Hi Experts,
System Details
OS - RHEL 7.7
TS - 16.6.1.1
I am trying to create a custom layout for my livesite pages.
Below are the steps I followed along with code:
1> Created a custom layout xsl under livesite-customer-src/etc/classed folder
2> Added a entry in pagetype-config.xml
3>created a canvas under iw folder.
Now I am trying to add one more custom layout under my main custom layout, so I have created a new custom layout with name two-column-layout.xsl and try to call the template from main xsl. The problem is when I am trying to preview the .page I am getting error
System Details
OS - RHEL 7.7
TS - 16.6.1.1
I am trying to create a custom layout for my livesite pages.
Below are the steps I followed along with code:
1> Created a custom layout xsl under livesite-customer-src/etc/classed folder
2> Added a entry in pagetype-config.xml
3>created a canvas under iw folder.
Now I am trying to add one more custom layout under my main custom layout, so I have created a new custom layout with name two-column-layout.xsl and try to call the template from main xsl. The problem is when I am trying to preview the .page I am getting error
"Caused by: javax.xml.transform.TransformerConfigurationException: javax.xml.transform.TransformerException: org.xml.sax.SAXException: javax.xml.transform.TransformerException: ElemTemplateElement error: two_column_layout"
My main xsl code snippet is below:
<body id="home"> <xsl:comment>ls:begin[body]</xsl:comment> <xsl:value-of select="$newline" /> <xsl:text>$ASP_FORM_START[]</xsl:text> <!-- For ASP.NET rendering --> <xsl:text>$PAGE_SCOPE[body_injection_top]</xsl:text> <xsl:value-of select="$newline" /> <xsl:choose> <xsl:when test="PageType/Layout[@canvas-path='2ColumnLayout.xml']"> <xsl:call-template name="two_column_layout" /> </xsl:when> <xsl:otherwise> <xsl:apply-templates select="/Page/Layout"/> </xsl:otherwise> </xsl:choose> <xsl:text>$LIVESITE_ANALYTICS[]</xsl:text> <xsl:text>$PAGE_SCOPE[body_injection_bottom]</xsl:text> <xsl:text>$OPTIMOST_FOOTER[]</xsl:text> <xsl:text>$ASP_FORM_END[]</xsl:text> <!-- For ASP.NET rendering --> <xsl:comment>ls:end[body]</xsl:comment> <!-- Taglib delimiter --> <xsl:value-of select="$newline" /> <xsl:comment>ls:begin[page_track]</xsl:comment> <!-- Taglib delimiter --> <xsl:text>$PAGE_SCOPE[page_track]</xsl:text> <xsl:comment>ls:end[page_track]</xsl:comment> <!-- Taglib delimiter --> <xsl:value-of select="$newline" /> </body>
And two column layout xsl has below code snippet:
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:template name="two_column_layout"> <div class="site-header"> <div class="container clearfix"> <xsl:comment>headerArea:start</xsl:comment> <xsl:apply-templates select="/Page/Layout/descendant::FixedLayoutArea[@ID='headerArea']" /> <xsl:comment>headerArea:end</xsl:comment> </div> </div> </xsl:template> </xsl:stylesheet>
I couldn't debug the issue as if I am using only main access I can preview the page but once I add call template in main xsl I started getting preview error in .pages. Can someone please point me to the right direction where I am doing wrong.
TIA,
Niraj Kumar
0
Categories
- All Categories
- 107 Developer Announcements
- 53 Articles
- 105 General Questions
- 141 IM Services
- 43 OpenText Hackathon
- 32 Developer Tools
- 20.6K Analytics
- 4.1K AppWorks
- 8.9K Extended ECM
- 898 Cloud Fax and Notifications
- 76 Digital Asset Management
- 9.3K Documentum
- 29 eDOCS
- 118 Exstream
- 39.8K TeamSite
- 1.7K Web Experience Management
TeamSite Developer Resources
If you are interested in gaining full access to the content, you can register for a My Support account here.
- Docker Automation
- LiveSite Content Services (LSCS) REST API
- Single Page Application (SPA) Modules
- TeamSite Add-ons
If you are interested in gaining full access to the content, you can register for a My Support account here.