General Actions:
Log-in
Wiki:
L3D's Wiki
▼
:
Document Index
»
Space:
Blog
▼
:
Document Index
»
Page:
CreatePost
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
»
Create a new blog post
Wiki source code of
Create a new blog post
Last modified by
Administrator
on 2008/11/25 23:44
Content
·
Comments
(0)
·
Attachments
(0)
·
History
·
Information
Show line numbers
#includeMacros("Blog.BlogCode") #if($hasEdit) $xwiki.jsx.use($blogScriptsDocumentName)## ## ## ## #set($name = "$!request.entryTitle") #if($name == '') ## First step, display the create form #set($space = "$!request.entrySpace") #if($space == '') #set($space = $doc.space) #end 1.1 Create a new post <form action="${xwiki.getURL('Blog.CreatePost')}" id="newBlogPost" method="post"> <div> <input type="hidden" name="entrySpace" value="$space"/> <input type="text" name="entryTitle" value="Post title"/> <input type="submit" value="Create"/> </div> </form> #else ## Second step, form submitted, create the document #set($space = "$!request.entrySpace") #if($space == '') #set($space = 'Main') #end ## Remove . and : from the document name, as they have a special meaning in XWiki document names #set($postDocName = "${space}.${name.replaceAll('[.:]', '')}") ## Get the target blog document, to set it as the parent #getBlogDocument($space $blogDoc) #set($parent = $blogDoc.fullName) #set($title = $util.encodeURI($name)) $response.sendRedirect($xwiki.getURL($postDocName, 'inline', "template=${blogPostTemplate}&parent=${parent}&title=${title}&${blogPostClassname}_0_title=${title}")) #end## name == '' #end## hasEdit
Quick Links
L3D Calendar
Wiki Dashboard
Document Index
Blog
Sandbox