Create a new blog post
Log-in
|
Blog
:
Welcome to your wiki
>
Wiki blog
>
Create a new blog post
Top Menu
Show
:
Comments
Attachments
History
Information
Stampa
:
Stampa
Anteprima di stampa
Esporta come PDF
Esporta in formato RTF
Esporta come HTML
Esporta in formato XAR
Wiki source code of
Create a new blog post
Hide line numbers
1: #includeMacros("Blog.BlogCode") 2: #if($hasEdit) 3: $xwiki.jsx.use($blogScriptsDocumentName)## 4: ## 5: ## 6: ## 7: #set($name = "$!request.entryTitle") 8: #if($name == ’’) 9: ## First step, display the create form 10: #set($space = "$!request.entrySpace") 11: #if($space == ’’) 12: #set($space = $doc.space) 13: #end 14: 1.1 $msg.get(’xe.blog.post.createpost’) 15: <form action="${xwiki.getURL(’Blog.CreatePost’, ’view’, ’xpage=plain’)}" id="newBlogPost" method="post"> 16: <div> 17: <input type="hidden" name="entrySpace" value="$space"/> 18: <input type="text" name="entryTitle" value="$msg.get("xe.blog.post.title")"/> 19: <input type="submit" value="$msg.get("xe.blog.post.create")"/> 20: </div> 21: </form> 22: #else 23: ## Second step, form submitted, create the document 24: #set($space = "$!request.entrySpace") 25: #if($space == ’’) 26: #set($space = ’Main’) 27: #end 28: ## Remove . and : from the document name, as they have a special meaning in XWiki document names 29: #set($postDocName = "${space}.${name.replaceAll(’[.:]’, ’’)}") 30: ## Get the target blog document, to set it as the parent 31: #getBlogDocument($space $blogDoc) 32: #set($parent = $blogDoc.fullName) 33: #set($title = $util.encodeURI($name)) 34: $response.sendRedirect($xwiki.getURL($postDocName, ’inline’, "template=${blogPostTemplate}&parent=${parent}&title=${title}&${blogPostClassname}_0_title=${title}")) 35: #end## name == ’’ 36: #elseif("$!request.entryTitle" != ’’)## !hasEdit && form submitted 37: #template(’accessdenied.vm’) 38: #end## hasEdit
Recent Blog Posts
The first post of your wiki's blog
Blog Categories
News
(1)
Other
(0)
Personal
(0)
Blog Archive
2009
(1)
Search
Quick Links
Wiki Dashboard
Document Index
Blog
Sandbox
My Recent Modifications
dany
|
marco