In the default Juno installation with a blog, There is the Archive page, but no matter how many posts I publish, it remains empty. Am I supposed to manually add the posts to this page?
I have just tried installing the blog on a 4.6.1 of Umbraco and here the archive seems to be working fine. On the archive page, that is a part of the standard installation there should be a macro that lists the archived posts on the page.
The macro is called "BlogFullArchive" - Does this exist on your page?
There is an image icon in the forum editor right next to the "HTML" button. Second last item - once that it is clicked a dialouge will appear and allow you to upload the image.
Ok, if you go to the developer section could you then please paste the code from the BlogFullArchive.xslt file in here? I'm curious to see if it's written using the new or the old schema. In my 4.6.1 installation it works out of the box using the new schema without me having to change anything.
Did you install the blog package from within Umbraco or did you download it from our?
what does $currentPage/ancestor-or-self::Blog/DateFolder mean? I got that Blog and DateFolder are document types, but what's $currentPage/ancestor-or-self and how do I change it so that it doesn't depend on the current page?
The $currentPage parameter returns all the XML form the umbraco.config file (the XML cache, which is found in the App_Data folder) for the current page you are viewing.
So if you are on the Blog frontpage it would return all the XML from that page. When you're on the archive page it will return all the XML from that specific page.
But since you need to display the content from the DateFolder on your archive page, which is on the same level as the archive page itself you're using the ancestor-or-self axe. What it does in that it findes the "Blog" document type, which could either be an ancestor or the page itself. Then it goes from the "Blog" to find the DateFolder, which XML you then match and can fetch the values from.
Then it should be a bit more easy to grasp the concept of XSLT.
Could you perhaps go to the settings section and post a screendump of the properties set on your DateFolder document type? I'm curious to see if it is in fact named umbDateFolder in your installation. I'm very puzzled about what is happening.
Well somehow my post hasn't made it, so here's a brief version: I discovered (thx to Jan) that the Blog's node name is umbBlog, while the DateFolder's name is just DateFolder (you can see it in App_Data/umbraco.config). So, I changed line 17 to Snippet
Happy to see you found the solution. I'm a bit puzzled that our installs differ though...you have not changed any names in the document types etc.? Just installed it out of the box? (I did, not modifications or anything).
It just hit me - are you by any chance using the Basic Website package, like Rob is? Then it makes sense to me that we had these differences. If so then I guess this should be reported as a bug so the author of the package can fix it.
Well, to tell you the truth, I don't remember which starter kit I used, but must have been the one. It just installed the blog, that's it. Now I begin to suspect that this is different from Blog4Umbraco, right? Cause your blog is Umlaut.Umb.Blog, while what I got is Runway smth.
This was very helpfull. I'm wiser now. In the post I reffered to above Rob has been installing the business starter kit, which includes the blog package as well. I have just installed this locally and can see that it's a bit buggy.
I also saw the option to install just the blog kit, which also seems to have a minor bug after what we've been through in this post. I think I will test around a bit and then report bugs to codeplex tomorrow if they have not been created.
I discovered that it won't save comments. The reason is that the names of the input controls have wrong names. An easy fix would be to modify the field names in the AjaxCommentForm.ascx -- they should correspond to the id's. Or you could download and apply my patch from Codeplex.
Sorry for my obtuseness. To get your patch, do you have a patch file posted there, or is it merged with the latest version posted there? I'm still developing my codeplex sea legs
The patches are here: http://blog4umbraco.codeplex.com/SourceControl/list/patches, but you'll have to rebuild the code etc (my patch modifies the code, not the ascx file), which is quite a hassle, considering assembly versions and stuff.
Blog archive
Dearest All, here I am again.
In the default Juno installation with a blog, There is the Archive page, but no matter how many posts I publish, it remains empty. Am I supposed to manually add the posts to this page?
Thanks!
ulu
Hi Ulu
I have just tried installing the blog on a 4.6.1 of Umbraco and here the archive seems to be working fine. On the archive page, that is a part of the standard installation there should be a macro that lists the archived posts on the page.
The macro is called "BlogFullArchive" - Does this exist on your page?
/Jan
Yes it says,
<div umb_macroalias="BlogFullArchive" ismacro="true" onresizestart="return false;" umbversionid="9885f15f-ba2d-4cc4-96f2-64d87cdef5af" umbpageid="1059" title="This is rendered content from macro" class="umbMacroHolder"><!-- startUmbMacro -->
<div id="archieve" xmlns:math="http://exslt.org/math"></div>
<!-- endUmbMacro --></div>
Ok, and how does your archive page look like on the site? Could you perhaps post a screendump?
/Jan
Sure. How do I attach it here?
The HTML is:
Hi Ulu
Yeah, the HTML is pretty empty....
There is an image icon in the forum editor right next to the "HTML" button. Second last item - once that it is clicked a dialouge will appear and allow you to upload the image.
Hope this helps.
/Jan
You see, there's a post there, it shows on the main page, but not in the archive.
Ok, if you go to the developer section could you then please paste the code from the BlogFullArchive.xslt file in here? I'm curious to see if it's written using the new or the old schema. In my 4.6.1 installation it works out of the box using the new schema without me having to change anything.
Did you install the blog package from within Umbraco or did you download it from our?
/Jan
Here you are:
Snippet
I'm using the built-in blog, installed with the starter kit at the end of the Umbraco installation.
Try changing this line
<xsl:for-each select="$currentPage/ancestor-or-self::umbBlog/umbDateFolder">
to
<xsl:for-each select="$currentPage/ancestor-or-self::Blog/DateFolder">
This is what the line looks like in my XSLT. A bit puzzled that there is a difference though?...But try it out :-)
Hope this helps.
/Jan
So, I don't understand anything of this xslt thingy, but I see it says
Now, the DateFolder page is not an ansector of the Archive page. Maybe the problem is that it's a wrong page to put the macro on?
Doesn't work..
I just spotted that there are more differences between our XSLT files...
Here you see my complete XSLT. Try using this
<?xml 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"
xmlns:yourprefix="urn:my-scripts"
exclude-result-prefixes="msxml yourprefix umbraco.library">
<xsl:output method="html" omit-xml-declaration="yes"/>
<xsl:param name="currentPage"/>
<msxsl:script implements-prefix='yourprefix' language='CSharp'>
<![CDATA[
public string monthName(int monthNum)
{
DateTime date = new DateTime(1,monthNum,1);
return date.ToString("MMMM");
}
]]>
</msxsl:script>
<xsl:template match="/">
<div id="archieve">
<xsl:for-each select="$currentPage/ancestor-or-self::Blog/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="yourprefix:monthName(number(@nodeName))"/>
</h4>
<ul>
<xsl:for-each select=".//BlogPost">
<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>
/Jan
No luck..
what does $currentPage/ancestor-or-self::Blog/DateFolder mean? I got that Blog and DateFolder are document types, but what's $currentPage/ancestor-or-self and how do I change it so that it doesn't depend on the current page?
Gotta sleep on it.. Thanks a lot anyway!
The $currentPage parameter returns all the XML form the umbraco.config file (the XML cache, which is found in the App_Data folder) for the current page you are viewing.
So if you are on the Blog frontpage it would return all the XML from that page. When you're on the archive page it will return all the XML from that specific page.
But since you need to display the content from the DateFolder on your archive page, which is on the same level as the archive page itself you're using the ancestor-or-self axe. What it does in that it findes the "Blog" document type, which could either be an ancestor or the page itself. Then it goes from the "Blog" to find the DateFolder, which XML you then match and can fetch the values from.
I hope this makes sense but if you don't have any XSLT/XML experience at all I suggest you read a tutorial like http://zvon.org/xxl/XSLTutorial/Books/Output/contents.html
Then it should be a bit more easy to grasp the concept of XSLT.
Could you perhaps go to the settings section and post a screendump of the properties set on your DateFolder document type? I'm curious to see if it is in fact named umbDateFolder in your installation. I'm very puzzled about what is happening.
/Jan
Well somehow my post hasn't made it, so here's a brief version: I discovered (thx to Jan) that the Blog's node name is umbBlog, while the DateFolder's name is just DateFolder (you can see it in App_Data/umbraco.config). So, I changed line 17 to Snippet
And everything worked!
Hi Ulu
Happy to see you found the solution. I'm a bit puzzled that our installs differ though...you have not changed any names in the document types etc.? Just installed it out of the box? (I did, not modifications or anything).
/Jan
Hi Ulu
From reading this post: http://our.umbraco.org/forum/getting-started/installing-umbraco/16758-Business-Website-Starter-Kit-461-new-install
It just hit me - are you by any chance using the Basic Website package, like Rob is? Then it makes sense to me that we had these differences. If so then I guess this should be reported as a bug so the author of the package can fix it.
Cheers
/Jan
Hi Jan,
Well, to tell you the truth, I don't remember which starter kit I used, but must have been the one. It just installed the blog, that's it. Now I begin to suspect that this is different from Blog4Umbraco, right? Cause your blog is Umlaut.Umb.Blog, while what I got is Runway smth.
How do I report the issue?
ulu
Hi Ulu
This was very helpfull. I'm wiser now. In the post I reffered to above Rob has been installing the business starter kit, which includes the blog package as well. I have just installed this locally and can see that it's a bit buggy.
I also saw the option to install just the blog kit, which also seems to have a minor bug after what we've been through in this post. I think I will test around a bit and then report bugs to codeplex tomorrow if they have not been created.
Cheers
/Jan
No problem, and thanks for the great product!
ulu
Jan,
Suppose I use the dll from the source downloaded from CodePlex. Do I need to change anything, like xslt?
ulu
Ulu: thanks for posting your fix; helped me here, too. Were there any other issues with this package you found?
Thanks much, again -- Kyle
I discovered that it won't save comments. The reason is that the names of the input controls have wrong names. An easy fix would be to modify the field names in the AjaxCommentForm.ascx -- they should correspond to the id's. Or you could download and apply my patch from Codeplex.
Ulu,
Sorry for my obtuseness. To get your patch, do you have a patch file posted there, or is it merged with the latest version posted there? I'm still developing my codeplex sea legs
The patches are here: http://blog4umbraco.codeplex.com/SourceControl/list/patches, but you'll have to rebuild the code etc (my patch modifies the code, not the ascx file), which is quite a hassle, considering assembly versions and stuff.
Most excellent; thanks!
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.