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
Oddities? Here is the view from "inside" umbraco:
And here's the view, rendered in the out-facing page:
Why do I only see January for the month? How do I fix this?
This is using the "StartKit Blog, version 1.1"
Hi Kyle
What version of the blog package did you install?
And do you have any idea what the XSLT file rendering the dates look like? Then please post the code :)
/Jan
Starter Blog v 1.1 + umbraco 4.7
The Archive page calls this:
<div umb_macroalias="BlogFullArchive" ismacro="true" onresizestart="return false;" umbversionid="a6562ec2-7de7-4b3f-9aea-d0862c5c0d87" umbpageid="1263" title="This is rendered content from macro" class="umbMacroHolder">
which, in turn, calls this XSLT. Do I misread? Does this XSLT hard-code the year?
version="1.0" encoding="UTF-8"?><xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxml="urn:schemas-microsoft-com:xslt" xmlns:msxsl="urn:schemas-microsoft-com:xslt" xmlns:math="http://exslt.org/math" xmlns:umbraco.library="urn:umbraco.library" exclude-result-prefixes="msxml umbraco.library"> <xsl:output method="html" omit-xml-declaration="yes"/> <xsl:param name="currentPage"/> <xsl:template match="/"> <div id="archieve"> <xsl:for-each select="$currentPage/ancestor-or-self::umbBlog/DateFolder"> <xsl:sort select="number(@nodeName)" data-type="number" order="descending"/> <h3> <xsl:value-of select="@nodeName"/> h3> <div class="tab"> <xsl:for-each select="./DateFolder"> <xsl:sort select="number(@nodeName)" data-type="number" order="descending"/> <h4> <xsl:value-of select="umbraco.library:FormatDateTime( concat('01-', @nodeName , '-2010'), 'MMMM' )"/> h4> <ul> <xsl:for-each select=".//umbBlogPost"> <li> <a href="{umbraco.library:NiceUrl(@id)}"> <xsl:value-of select="@nodeName"/> a> <br/> <small> Posted: <xsl:value-of select="umbraco.library:LongDate(PostDate)"/> By: <xsl:value-of select="@writerName"/> small> li> xsl:for-each> ul> xsl:for-each> div> xsl:for-each> div> xsl:template>xsl:stylesheet>
I'm guessing that this package is using some kind of named datefolders perhaps?
I think this block is doing it...
In this code... <li> <a href="{umbraco.library:NiceUrl(@id)}"> <xsl:value-of select="@nodeName"/> </a> <br/> <small> Posted: <xsl:value-of select="umbraco.library:LongDate(PostDate)"/> By: <xsl:value-of select="@writerName"/> </small> </li>
You write out the nodeName, which I suppose is "January" for some obscure reason? :-)
Hope this helps.
Here is the troublesome line:
<h4> <xsl:value-of select="umbraco.library:FormatDateTime( concat('01-', @nodeName , '-2010'), 'MMMM' )"/><h4>
Look at the screen shots. The months are correct in the editor/rendered view, but not on the actual page. Odd, no?
Argh; any other ideas?
January is coming from the 01 part of the string - test this by changing it to 02 so you need to alter the string
Change this:
<h4><xsl:value-of select="umbraco.library:FormatDateTime( concat('01-', @nodeName , '-2010'), 'MMMM' )"/><h4>
To:
<h4><xsl:value-of select="umbraco.library:FormatDateTime( concat(@nodeName, '-', '01', '-2010'), 'MMMM' )"/><h4>
The correct xslt line of code in "umbBlogFullArchive.xslt" is as follows:
<h4> <xsl:value-of select="umbraco.library:FormatDateTime( concat(@nodeName,'-01' ,'-2010'), 'MMMM' )"/>
</h4
The above change shows the correct month on the archive page on the website, but the January month shows up in the content archive page in edit mode. Not sure of what is going on.
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Blog & 4.7: Archives only lists January for month
Oddities? Here is the view from "inside" umbraco:
And here's the view, rendered in the out-facing page:
Why do I only see January for the month? How do I fix this?
This is using the "StartKit Blog, version 1.1"
Hi Kyle
What version of the blog package did you install?
And do you have any idea what the XSLT file rendering the dates look like? Then please post the code :)
/Jan
Starter Blog v 1.1 + umbraco 4.7
The Archive page calls this:
<div umb_macroalias="BlogFullArchive" ismacro="true" onresizestart="return false;" umbversionid="a6562ec2-7de7-4b3f-9aea-d0862c5c0d87" umbpageid="1263" title="This is rendered content from macro" class="umbMacroHolder">
which, in turn, calls this XSLT. Do I misread? Does this XSLT hard-code the year?
version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:msxml="urn:schemas-microsoft-com:xslt"
xmlns:msxsl="urn:schemas-microsoft-com:xslt"
xmlns:math="http://exslt.org/math"
xmlns:umbraco.library="urn:umbraco.library"
exclude-result-prefixes="msxml umbraco.library">
<xsl:output method="html" omit-xml-declaration="yes"/>
<xsl:param name="currentPage"/>
<xsl:template match="/">
<div id="archieve">
<xsl:for-each select="$currentPage/ancestor-or-self::umbBlog/DateFolder">
<xsl:sort select="number(@nodeName)" data-type="number" order="descending"/>
<h3>
<xsl:value-of select="@nodeName"/>
h3>
<div class="tab">
<xsl:for-each select="./DateFolder">
<xsl:sort select="number(@nodeName)" data-type="number" order="descending"/>
<h4>
<xsl:value-of select="umbraco.library:FormatDateTime( concat('01-', @nodeName , '-2010'), 'MMMM' )"/>
h4>
<ul>
<xsl:for-each select=".//umbBlogPost">
<li>
<a href="{umbraco.library:NiceUrl(@id)}">
<xsl:value-of select="@nodeName"/>
a>
<br/>
<small>
Posted: <xsl:value-of select="umbraco.library:LongDate(PostDate)"/>
By: <xsl:value-of select="@writerName"/>
small>
li>
xsl:for-each>
ul>
xsl:for-each>
div>
xsl:for-each>
div>
xsl:template>
xsl:stylesheet>
Hi Kyle
I'm guessing that this package is using some kind of named datefolders perhaps?
I think this block is doing it...
In this code...
<li>
<a href="{umbraco.library:NiceUrl(@id)}">
<xsl:value-of select="@nodeName"/>
</a>
<br/>
<small>
Posted: <xsl:value-of select="umbraco.library:LongDate(PostDate)"/>
By: <xsl:value-of select="@writerName"/>
</small>
</li>
You write out the nodeName, which I suppose is "January" for some obscure reason? :-)
Hope this helps.
/Jan
Here is the troublesome line:
<h4>
<xsl:value-of select="umbraco.library:FormatDateTime( concat('01-', @nodeName , '-2010'), 'MMMM' )"/>
<h4>
Look at the screen shots. The months are correct in the editor/rendered view, but not on the actual page. Odd, no?
Argh; any other ideas?
January is coming from the 01 part of the string - test this by changing it to 02 so you need to alter the string
Change this:
<h4>
<xsl:value-of select="umbraco.library:FormatDateTime( concat('01-', @nodeName , '-2010'), 'MMMM' )"/>
<h4>
To:
<h4>
<xsl:value-of select="umbraco.library:FormatDateTime( concat(@nodeName, '-', '01', '-2010'), 'MMMM' )"/>
<h4>
The correct xslt line of code in "umbBlogFullArchive.xslt" is as follows:
<h4>
<xsl:value-of select="umbraco.library:FormatDateTime( concat(@nodeName,'-01' ,'-2010'), 'MMMM' )"/>
</h4
The above change shows the correct month on the archive page on the website, but the January month shows up in the content archive page in edit mode. Not sure of what is going on.
is working on a reply...