Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Hi,
truncatedFolderUrl() shows url with folders structure instead of truncatedFolderUrl from autofolders.config which looks like that:
<autoFolder docType="NewsArticle"folderProviderAlias="DateFolderProvider_News"folderDocType="NewsDateFolder"rootFolders="//* [@isDoc and @level=2 and name() = 'News']"truncatedFolderUrl="news"/>
my xslt code:
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE xsl:stylesheet [ <!ENTITY nbsp " "> ]><xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxml="urn:schemas-microsoft-com:xslt" xmlns:umbraco.library="urn:umbraco.library" xmlns:autofolders.library="urn:autofolders.library" xmlns:Exslt.ExsltCommon="urn:Exslt.ExsltCommon" xmlns:Exslt.ExsltDatesAndTimes="urn:Exslt.ExsltDatesAndTimes" xmlns:Exslt.ExsltMath="urn:Exslt.ExsltMath" xmlns:Exslt.ExsltRegularExpressions="urn:Exslt.ExsltRegularExpressions" xmlns:Exslt.ExsltStrings="urn:Exslt.ExsltStrings" xmlns:Exslt.ExsltSets="urn:Exslt.ExsltSets" xmlns:tagsLib="urn:tagsLib" xmlns:BlogLibrary="urn:BlogLibrary" exclude-result-prefixes="msxml umbraco.library autofolders.library Exslt.ExsltCommon Exslt.ExsltDatesAndTimes Exslt.ExsltMath Exslt.ExsltRegularExpressions Exslt.ExsltStrings Exslt.ExsltSets tagsLib BlogLibrary "><xsl:output method="html" omit-xml-declaration="yes" indent="yes" /><xsl:param name="currentPage"/><xsl:variable name="Items" select="$currentPage//NewsArticle[@isDoc]"/> <xsl:template match="/"> <xsl:copy-of select="$Items"/> <ul> <xsl:for-each select="$Items"> <li> <a> <xsl:attribute name="href"> <xsl:value-of select="autofolders.library:NiceUrl(@id)"/> </xsl:attribute> <xsl:value-of select="@nodeName"/> </a> </li> </xsl:for-each> </ul> </xsl:template></xsl:stylesheet>
xml output:
<pddnewsarticle id="2198" parentid="2199" level="5" writerid="0" creatorid="0" nodetype="1581" template="1607" sortorder="1" createdate="2012-09-17T11:50:08" updatedate="2012-09-17T11:50:53" nodename="Test news post" urlname="test-news-post" writername="admin" creatorname="admin" path="-1,1116,1605,2190,2199,2198" isdoc=""><pagedate>2012-09-01T00:00:00</pagedate><umbracourlname></umbracourlname><umbracourlalias></umbracourlalias></pddnewsarticle>
html outuput:
<ul><li><a href="/news/2012/09/test-news-post/">Test news post</a></li><br></ul>
However when I remove date folders structure from the url in browser it will work
/news/test-news-post/
So the question is how to make autofolders.library:NiceUrl(@id) produce url without folders structure?
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
autofolders.library:NiceUrl(@id) is not showing truncatedFolderUrl
Hi,
truncatedFolderUrl() shows url with folders structure instead of truncatedFolderUrl from autofolders.config which looks like that:
my xslt code:
xml output:
html outuput:
However when I remove date folders structure from the url in browser it will work
So the question is how to make autofolders.library:NiceUrl(@id) produce url without folders structure?
is working on a reply...