Adding blog features to my d-works SiteBuilder
I didn't realize until it was done, but the blog template actually features different content blocks interacting with each-other...
New tags: pagelist, thismonth, calendar and archive
This is the page template for the blog section:
<div id="allsites"><a href="/domino/" id="dwsb"> </a>[%allsites%]</div>
<div id="canvas">
[%header%]
<div id="main">
<div id="subnav">[%subnav%]</div>
<div id="content">
[%adminactions%]
[%pagelist%]
</div>
<div id="related">
<div class="block">
<h3>[%thismonth%]</h3>
[%calendar%]
</div>
<div class="block">
<h3>Archive</h3>
[%archive%]
</div>
</div>
</div>
</div>
[%footer%]
The pagelist code
This tag reacts on what the other content blocks add to the Query_String:
Private Function pr_getPageList As String
On Error Goto catch
Dim out As New stringbuffer(20)
Dim sTitle As String
Dim aKey(1) As String
aKey(0)=doc.UniversalID
sTitle=doc.subject(0)
If query.getValue("month")>"" Then
aKey(1)=query.getValue("month")
out.add |<h1>| & sTitle & | - | & fullDate(aKey(1)) & |</h1>|
out.add getViewPage("bymonth", aKey, 3, 10)
Elseif query.getValue("day")>"" Then
aKey(1)=query.getValue("day")
out.add |<h1>| & sTitle & | - | & Cint(Right(aKey(1), 2)) & " "& fullDate(aKey(1)) & |</h1>|
out.add getViewPage("byday", aKey, 3, 10)
Else
out.add |<h1>| & sTitle & | - recent</h1>|
out.add getViewPage("recent", doc.UniversalID, 2, 10)
End If
pr_getPageList=Replace(out.collapse(NEWLINE), "/domino/", path)
Goto finally
catch:
pr_getPageList="Error " & Err & " in pr_getPageList, line " & Erl & ": " & Error$
Resume finally
finally:
End Function
Next?
You can see my progress online. Next will be adding images, multimedia and downloads to pages.
Comments
25/08/2008 10.11.54, gaetano gastaldin
Hi, We are working on similar CMS/Wedesign projects . and we are interested to explore the opportunity to have a cooperation .
My best/g
To add a comment, log in or register as new user. It's free and safe.