General Actions:
Log-in
Register
Wiki:
Main wiki
▼
:
Document Index
»
Space:
Blog
▼
:
Document Index
»
Page:
BlogPostSheet
Search
default
Page Actions:
Export
▼
:
Export as PDF
Export as RTF
Export as HTML
More actions
▼
:
Print preview
View Source
Main wiki
»
The Wiki Blog
»
XClass representing a blog entry
»
Wiki source code of
Last modified by
Administrator
on 2012/03/21 17:41
Content
·
Comments
(0)
·
Annotations
(0)
·
Attachments
(0)
·
History
·
Information
Hide line numbers
1: {{include document="Blog.BlogCode"/}} 2: 3: {{include document="Blog.CategoriesCode"/}} 4: 5: {{velocity filter="none"}} 6: {{html clean="false" wiki="true"}} 7: $xwiki.jsx.use('Blog.ManageCategories', {'mode' : 'select'})## 8: $xwiki.ssx.use('Blog.ManageCategories')## 9: #getEntryObject($doc $entryObj) 10: #if("$!entryObj" == '') 11: #warning($msg.get('xe.blog.sheet.notpost')) 12: ## Keep testing the inline action for backward compatibility with older blog posts. 13: #elseif($xcontext.action != 'edit' && $xcontext.action != 'inline') 14: ## View mode 15: #isPublished($entryObj $isPublished) 16: #isHidden($entryObj $isHidden) 17: ## displayBlog requires a list of documents, and whether to display only an extract or the full entry. 18: #displayBlog([$tdoc] 'single' false false) 19: #else 20: <dl> 21: <dt>$msg.get('xe.blog.sheet.title')</dt> 22: <dd>$doc.display('title', 'edit', $entryObj)</dd> 23: <dt>$msg.get('xe.blog.sheet.content')</dt> 24: <dd>$doc.display('content', 'edit', $entryObj)</dd> 25: <dt>$msg.get('xe.blog.sheet.summary')</dt> 26: <dd>$doc.display('extract', 'edit', $entryObj)</dd> 27: <dt>$msg.get('xe.blog.sheet.category')</dt> 28: <dd> 29: #displayCategoryManagementTree('' 'selectable') 30: <div class="clearfloats"></div> 31: </dd> 32: </dl> 33: #template('tagedit.vm') 34: #isPublished($entryObj $isPublished) 35: #if($isPublished) 36: #if($doc.creator == $xcontext.user) 37: #publishMessageBox($msg.get('xe.blog.sheet.publicationdate', [${doc.display('publishDate', 'view', $entryObj)}])) 38: #set($hideArticle = ${doc.display('hidden', 'edit', $entryObj)}) 39: #hideMessageBox($msg.get('xe.blog.sheet.hidearticle', [${hideArticle}])) 40: #end 41: #else 42: #set($defaultDate = $xwiki.getDocument($blogPostTemplate).getObject($blogPostClassname).getProperty('publishDate').value.time) 43: #if($entryObj.getProperty('publishDate').value.time == $defaultDate) 44: ## The publish date was not set, force it to be the creation date 45: $entryObj.set('publishDate', $doc.creationDate) 46: #end 47: #publishMessageBox("$msg.get('xe.blog.sheet.notpublished') <label>**$msg.get('xe.blog.sheet.publish') ${doc.display('published', 'edit', $entryObj)}**</label>\\<label>$msg.get('xe.blog.sheet.setdate') ${doc.display('publishDate', 'edit', $entryObj)}</label>") 48: #end 49: #end 50: {{/html}} 51: {{/velocity}}
Recent Blog Posts
First blog post
Blog Categories
News
(1)
Other
(0)
Personal
(0)
Blog Archive
2009
(1)