General Actions:
Log-in
Wiki:
L3D's Wiki
▼
:
Document Index
»
Space:
Blog
▼
:
Document Index
»
Page:
Management
Search
Page Actions:
Export
▼
:
Export as PDF
Export as RTF
Export as HTML
More actions
▼
:
Print preview
View Source
Welcome to your wiki
»
Wiki blog
»
Manage blogs on this wiki
Wiki source code of
Manage blogs on this wiki
Last modified by
Administrator
on 2008/11/25 23:22
Content
·
Comments
(0)
·
Attachments
(0)
·
History
·
Information
Show line numbers
#includeMacros("Blog.BlogCode") #if($hasAdmin) ## ## ## List existing blogs. ## TODO: Display the number of articles in each blog ## TODO: Provide some management links: delete, edit title, configure... ## 1 Existing blogs #foreach($item in $xwiki.wrapDocs($xwiki.searchDocuments(", BaseObject obj where obj.name = doc.fullName and obj.className = '$blogClassname'"))) #getBlogTitle($item $title) #if($title != "") * [$title>$item.fullName] #else * [$item.displayTitle>$item.fullName] #end #end ## ## ## New blog ## 1 Create a new blog #set($title = "$!request.blogTitle") #if($title != '') #set($space = "$!request.blogSpace") #if($space == '') #warning('No space provided. Please enter a valid space where the blog should be created.') #else #if("$!request.blogType" == 'main') #set($blogDocName = "${space}.WebHome") #else #set($blogDocName = "${space}.Blog") #end #set($title = $util.encodeURI($title)) #set($parent = 'Main.WebHome') $response.sendRedirect($xwiki.getURL($blogDocName, 'save', "parent=${parent}&title=${title}&template=${blogTemplate}&${blogClassname}_0_title=${title}")) #end #end ## ## Show the form <form action="${xwiki.getURL('Blog.Management')}" id="newBlog" method="post"> <div> <dl> <dt><label for="blogSpace">Space:</label></dt> <dd><input type="text" name="blogSpace" id="blogSpace" value=""/></dd> <dt><label for="blogTitle">Title:</label></dt> <dd><input type="text" name="blogTitle" id="blogTitle" value="Blog title"/></dd> <dt><label for="blogType">Blog type:</label></dt> <dd><select name="blogType" id="blogType"> <option value="inner" selected="selected">blog inside an existing space</option> <option value="main">blog as the main content of a space</option> </select></dd> </dl> <input type="submit" value="Create"/> </div> </form> #else ## !hasAdmin #xwikimessageboxstart($msg.get("error") $msg.get("notallowed")) #xwikimessageboxend() #end
Quick Links
L3D Calendar
Wiki Dashboard
Document Index
Blog
Sandbox