|
List Info
Thread: Monthly Archives on OS 10.4.8
|
|
| Monthly Archives on OS 10.4.8 |

|
2006-10-31 20:58:05 |
|
Right, that’;s just defining the macro. But, if that works when placed at the top of one of your templates, you should be able to use, for example:
#MonthlyArchive(1 2006)
at some place later in the page to have it print the archive list.
On 10/31/06 3:53 PM, "Milos Topic" <topicm mail.montclair.edu> wrote:
Now, the code
#macro(MonthlyArchive $startingMonth $startingYear)
<ul>
#set ($currentMonth = $BLOJSOM_CALENDAR.getCurrentMonth() + 1)
#set ($totalMonths = 12)
#set ($currentYear = $BLOJSOM_CALENDAR.getCurrentYear())
#set ($padding = 0)
#foreach ($year in [$currentYear..$startingYear])
#set ($monthIndex = 1)
#if ($year == $startingYear)
#set($monthIndex = $startingMonth)
#end
#if ($year == $currentYear)
#set($totalMonths = $currentMonth)
#else
#set ($totalMonths = 12)
#end
#foreach ($month in [$totalMonths..$monthIndex])
#set ($calMonth = $month - 1)
<li><a href="#BlogURL()$year/#if($month < 10)$padding#end$month/">$BLOJSOM_CALENDAR.getMonthName($calMonth) $year</a></li>
#end
#end
</ul>
#end
Doesn’t do anything, it doesn̵7;t interfere with the blog, but it doesn̵7;t display anything new at all. Very strange.
Thanks,
Milos
--
-
http://newton.montclair.edu/weblog/topicm/
-
--
"Only two things are infinite, the universe and human stupidity, and I'm not sure about the former." - Albert Einstein.
From: blojsom-users-bounces lists.sourceforge.net [ blojsom-users-bounces lists.sourceforge.net]">mailto:blojsom-users-bounces lists.sourceforge.net] On Behalf Of David Czarnecki
Sent: Tuesday, October 31, 2006 11:24 AM
To: blojsom-users
Subject: Re: [Blojsom-users] Monthly Archives on OS 10.4.8
The only thing I can think is that one of the calendar methods below isn’t present on the calendar object for the version of blojsom that’;s included. Though, that doesn̵7;t seem likely. You could try adding the lines in one-by-one (or as a group in the case of the if statements) to see if it’s an error in the syntax, though I tried that on a local install and it the macro was OK.
On 10/30/06 10:04 PM, "Milos Topic" <topicm mail.montclair.edu> wrote:
It didn’;t work, it actually displayed “#MonthlyArchive(1 2006)” as a plain text on the page where I have added it. Nothing in the log file (literally, when I go to /Library/Tomcat/logs – there̵7;s nothing there). On the other hand, when I go to /Library/Tomcat/blojsom_root/logs the last log file is localhost_log.2006-10-23.txt with no errors in it.
Thanks,
Milos
-
--
"Only two things are infinite, the universe and human stupidity, and I'm not sure about the former." - Albert Einstein.
From: blojsom-users-bounces lists.sourceforge.net [ blojsom-users-bounces lists.sourceforge.net]">mailto:blojsom-users-bounces lists.sourceforge.net] blojsom-users-bounces lists.sourceforge.net%5d"><mailto:blojsom-users-bounces lists.sourceforge.net%5d> On Behalf Of David Czarnecki
Sent: Monday, October 30, 2006 9:01 PM
To: blojsom-users
Subject: Re: [Blojsom-users] Monthly Archives on OS 10.4.8
Hmmmm, that’;s the macro that’;s in the page macros included with blojsom. Are you able to use the following in a page?
#MonthlyArchive(1 2006)
If not, what gets printed in the Tomcat log file?
On 10/30/06 8:16 PM, "Milos Topic" <topicm mail.montclair.edu> wrote:
Does anyone know how to setup MonthlyArchive on entries on Apple̵7;s rendition of Blojsom?
I have used the below code as found on one of the Apple̵7;s open source sites, but it doesn̵7;t work…;it actually prevents the blogs from loading completely.
#macro(MonthlyArchive $startingMonth $startingYear)
<ul>
#set ($currentMonth = $BLOJSOM_CALENDAR.getCurrentMonth() + 1)
#set ($totalMonths = 12)
#set ($currentYear = $BLOJSOM_CALENDAR.getCurrentYear())
#set ($padding = 0)
#foreach ($year in [$currentYear..$startingYear])
#set ($monthIndex = 1)
#if ($year == $startingYear)
#set($monthIndex = $startingMonth)
#end
#if ($year == $currentYear)
#set($totalMonths = $currentMonth)
#else
#set ($totalMonths = 12)
#end
#foreach ($month in [$totalMonths..$monthIndex])
#set ($calMonth = $month - 1)
<li><a href="#BlogURL()$year/#if($month < 10)$padding#end$month/">$BLOJSOM_CALENDAR.getMonthName($calMonth) $year</a></li>
#end
#end
</ul>
#end
I am sure that there has to be a simpler way or doing this that actually works.
Thanks,
Milos
-
--
"Only two things are infinite, the universe and human stupidity, and I'm not sure about the former." - Albert Einstein.
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 <http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&amp;bid=263057&dat=121642> <http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&amp;bid=263057&dat=121642>
_______________________________________________
Blojsom-users mailing list
Blojsom-users lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/blojsom-users
--
David Czarnecki
http://www.blojsom.com/blog/ | http://blojsom.sf.net
|
[1]
|
|
|
about | contact Other archives ( Real Estate discussion Medical topics )
|