https://issues.apache.org/bugzilla/show_bug.cgi?id=45992
Summary: [News module] Error page in Lenya 2.0.2 Product: Lenya Version: 2.0 Platform: PC OS/Version: Linux Status: NEW Severity: normal Priority: P2 Component: Miscellaneous AssignedTo: dev@lenya.apache.org ReportedBy: [EMAIL PROTECTED] I have an error with the display of subnews. I want to create this architecture : - parent news folder (eg : "all news") -- child news folder 1 (eg : "Financial news") --- news item 1 --- news item 2 -- child news folder 2 (eg : "Motor news") If child news don't have news item inside (xhtml document), a clic on the "parent news folder" ("all news") fired an error. I found a solution with this two modifications 1--------- news module : sitemap.xmap-------------------- In the : <map:match pattern="feedContent/news/*/*/*/*/*"> __ After : <map:transform src="fallback://lenya/modules/news/xslt/includeSubNews.xsl"> <map:parameter name="pub" value="{2}"/> <map:parameter name="area" value="{3}"/> <map:parameter name="format" value="{1}"/> </map:transform> <map:transform type="include"/> __ Add: <map:transform src="fallback://lenya/modules/collection/xslt/prepareInclude.xsl"> <map:parameter name="pub" value="{2}"/> <map:parameter name="area" value="{3}"/> <map:parameter name="uuid" value="{4}"/> <map:parameter name="language" value="{5}"/> <map:parameter name="format" value="{1}"/> </map:transform> <map:transform type="include"/> <map:transform src="fallback://lenya/modules/news/xslt/includeSubNews.xsl"> <map:parameter name="pub" value="{2}"/> <map:parameter name="area" value="{3}"/> <map:parameter name="format" value="{1}"/> </map:transform> <map:transform type="include"/> 2 --------------- news module : /xslt/collection2xhtml.xsl --------- IN : <xsl:template match="col:document"> __ Comment : <xsl:apply-templates select="xhtml:html/xhtml:body//xhtml:p[1]" mode="excerpt"/> __ ADD after the comment : <xsl:apply-templates select="xhtml:html/xhtml:body//xhtml:[EMAIL PROTECTED]'newsItem']"/> __ ADD this new template : <xsl:template match="xhtml:[EMAIL PROTECTED]'newsItem']"> <div id="body"> <xsl:apply-templates select="@*|node()"/> <!-- this is another solution, display are similars <xsl:copy-of select="xhtml:h2"/> --> </div> </xsl:template> ========== Note and problem ======= Note : * The <div id="body"> in the <xsl:template match="xhtml:[EMAIL PROTECTED]'newsItem']"> is just for have an indent display. Another id, to define in the CSS, have to put here. Problem : * I don't find the solution for display for each post the first $maxword of the first paragraph. Attachment : BeforeCollection2-XX-XX.xml : the input flow of collection2xhtml.xsl. -- Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]