From version < 94.1 >
edited by Mohamed Boussaa
on 2017/06/02 18:29
To version < 95.1 >
edited by Denis Gervalle
on 2017/06/06 10:20
< >
Change comment: There is no comment for this version

Summary

Details

Page properties
Author
... ... @@ -1,1 +1,1 @@
1 -xwiki:XWiki.mouhb
1 +xwiki:XWiki.dgervalle
ExtensionCode.ExtensionClass[0]
Description
... ... @@ -29,6 +29,7 @@
29 29  == Creating a new Blog Post ==
30 30  
31 31  There are currently 2 ways of creating a blog post:
32 +
32 32  1. By going to the Blog's homepage and using the "Create a new post" input where you enter the post title and hit the "Create" button:(((
33 33  {{image reference="createBlogPostUI.png"/}}
34 34  )))
... ... @@ -37,46 +37,54 @@
37 37  )))
38 38  
39 39  == Post image thumbnail ==
41 +
40 40  {{info}}Since 9.4{{/info}}, an image thumbnail was added to blog posts in order to allow a more visual and appealing display of blogs posts and list of blog posts.
41 41  {{image reference="imageThumbnail.png"/}}
42 42  //Blog post image thumbnail//
43 43  
44 44  == Useful Macros ==
47 +
45 45  {{info}}Since 9.4{{/info}}, Blog Post List macro, post layout macros and Blog Post Create Macro are available, these macros can be used to query and display blog posts anywhere on the wiki.
46 46  
47 47  === Blog Post List Macro ===
51 +
48 48  The Blog Post List Macro is used to query and display blog posts anywhere on the wiki, based on some parameters, the results can be displayed using customizable post layouts.
49 49  
50 -====Usage====
54 +==== Usage ====
51 51  
52 -{{code}}{{blogpostlist blog="Blog.WebHome" category="Blog.News" published="yes" layout="full" layoutParams="displayTitle=false" limit="10" /}}{{/code}}
56 +{{code}}
57 +{{blogpostlist blog="Blog.WebHome" category="Blog.News" published="yes" layout="full" layoutParams="displayTitle=false" limit="10" /}}
58 +{{/code}}
53 53  
54 54  **Parameters definition**
55 55  
56 56  |=Name|=Optional|=Allowed values|=Default value|=Description
57 -|blog|yes|a document reference| |The  descriptor document of a blog (It should contain a document with a Blog.BlogClass object)
58 -|category|yes|a document reference||Either a given category or a category space (not mandatory, at least blog or category mandatory)
63 +|blog|yes|a document reference| |The descriptor document of a blog (It should contain a document with a Blog.BlogClass object)
64 +|category|yes|a document reference| |Either a given category or a category space (not mandatory, at least blog or category mandatory)
59 59  |published|yes|yes, no, all|yes|Limit results to published posts
60 60  |hidden|yes|yes, no, all|no|Limit results to hidden posts
61 -|fromDate|yes|string date||Limit posts to posts published starting from a given date. The format of the date is yyyy-mm-dd.
62 -|toDate|yes|string date||Limit posts to posts published before a given date. The format of the date is yyyy-mm-dd.
67 +|fromDate|yes|string date| |Limit posts to posts published starting from a given date. The format of the date is yyyy-mm-dd.
68 +|toDate|yes|string date| |Limit posts to posts published before a given date. The format of the date is yyyy-mm-dd.
63 63  |limit|yes|integer|10|Number of posts to display
64 64  |layout|yes|link,full,image|link|The name of the post layout macro that will be used to display the posts. The naming convention for the layout macros is: "BlogPostLayout${LayoutNameWithFirstLetterCapitalized}"
65 -|layoutParams|yes|string||Additional parameters of the blog post layout
71 +|layoutParams|yes|string| |Additional parameters of the blog post layout
66 66  |paginated|yes|yes,no|if the limit parameter is not provided the itemsPerPage is extracted from the blog descriptor|Used to enble/disable the pagination of the the blogPostList macro results
67 67  
68 68  === Blog Post Layout Macros ===
75 +
69 69  Blog post layouts are wiki macros created in order to customize the layout of blog posts. Currently 3 blog post layout macros are available: blogPostLayoutLink, blogPostLayoutFull and blogPostLayoutImage.
70 70  
71 71  ==== Usage ====
72 72  
73 -{{code}}{{blogPostLayoutFull reference="Blog.MyFirstPost" params="displayTitle=true|useSummary=true"}}{{/code}}
80 +{{code}}
81 +{{blogPostLayoutFull reference="Blog.MyFirstPost" params="displayTitle=true|useSummary=true"}}
82 +{{/code}}
74 74  
75 75  **Parameters definition**
76 76  
77 77  |=Name|=Optional|=Allowed values|=Default value|=Description
78 78  |reference|no|a document reference| |The document reference of the blog post
79 -|params|yes|string||Additional parameters of the blog post layout
88 +|params|yes|string| |Additional parameters of the blog post layout
80 80  
81 81  ==== Examples of post layouts ====
82 82  
... ... @@ -90,6 +90,7 @@
90 90  //The image post layout(BlogPostLayoutImage macro)//
91 91  
92 92  ==== How to configure a new blog post layout? ====
102 +
93 93  * Create the blog post layout using this naming convention: "BlogPostLayout${LayoutNameWithFirstLetterCapitalized}"
94 94  eg: SomePage.BlogPostLayoutMyLayout
95 95  * Configure a given blog to use the new layout
... ... @@ -96,7 +96,8 @@
96 96  ** Edit the Blog.BlogClass, and for the field postsLayout, add the new layout name to the static list (|myLayout=My layout)
97 97  ** Edit the descriptor of your blog, and in the BlogClass object, change the layout to the new one.
98 98  
99 -=== Blog Post Create Macro ==
109 +=== Blog Post Create Macro ===
110 +
100 100  The Blog Post Create macro is used to insert a post creation form anywhere on the wiki. The macro takes a blog descriptor document as parameter. The new blog posts will belongs to the blog specified in the parameter.
101 101  
102 102  {{image reference="blogPostCreate.png"/}}
... ... @@ -106,7 +106,9 @@
106 106  
107 107  In order to display the RSS Feed icon on your blog you have to add this line:
108 108  
109 -{{code language="none"}}<link rel="alternate" type="application/rss+xml" title="Blog RSS Feed" href="$xwiki.getURL('Blog.BlogRss', 'view', 'xpage=plain')" />{{/code}}
120 +{{code language="none"}}
121 +<link rel="alternate" type="application/rss+xml" title="Blog RSS Feed" href="$xwiki.getURL('Blog.BlogRss', 'view', 'xpage=plain')" />
122 +{{/code}}
110 110  
111 111  to the **Blog's Presentation HTTP Meta Information** text area. You can reach that by clicking on **Administration -> Administer Space: 'Blog Space Name' -> Page Elements**.
112 112  
... ... @@ -118,19 +118,19 @@
118 118  
119 119  It is also possible to customize the Blog application for specific purposes. You will need some Velocity knowledge to do this, so please check the [[Developer's Guide>>platform:DevGuide.WebHome]] for more information.
120 120  
121 -You can add / change blog categories on the http:~//<server>/xwiki/bin/view/Blog/ManageCategories page.
134 +You can add / change blog categories on the http:~/~/<server>/xwiki/bin/view/Blog/ManageCategories page.
122 122  
123 -A panel that lists all blog categories is also available. You can find it on the http:~//<server>/xwiki/bin/view/Blog/CategoriesPanel page of your XWiki.
136 +A panel that lists all blog categories is also available. You can find it on the http:~/~/<server>/xwiki/bin/view/Blog/CategoriesPanel page of your XWiki.
124 124  
125 125  == Screenshots ==
126 126  
127 -{{image reference="BlogPanel.png" /}}
140 +{{image reference="BlogPanel.png"/}}
128 128  //The Blog Categories Panel//
129 129  
130 -{{image reference="BlogArticle.png" /}}
143 +{{image reference="BlogArticle.png"/}}
131 131  //A Blog Article//
132 132  
133 -{{image reference="XWikiBlog.png" /}}
146 +{{image reference="XWikiBlog.png"/}}
134 134  //A Blog Main Page//
135 135  
136 136  {{info}}Since 9.4{{/info}}, Blogs panel is proposed to display all blogs sharing a same set of categories
... ... @@ -142,11 +142,11 @@
142 142  
143 143  {{info}}Since 9.2{{/info}}, users can observe the Blog Application in their notifications preferences:
144 144  
145 -{{image reference="NotificationSettings.png" /}}
158 +{{image reference="NotificationSettings.png"/}}
146 146  
147 147  Then, when a blog post is published, a notification is displayed on the top menu.
148 148  
149 -{{image reference="Notification.png" /}}
162 +{{image reference="Notification.png"/}}
150 150  
151 151  
152 152  
ExtensionCode.ExtensionVersionClass[103]
Release Notes
ExtensionCode.ExtensionVersionClass[104]
Release Notes
... ... @@ -1,0 +1,3 @@
1 +{{jira url="https://jira.xwiki.org" style="list" source="jql"}}
2 +project = BLOG and fixVersion = "9.4"
3 +{{/jira}}
blog.pngCreate and manage blog posts
Recommended
TypeXAR
Developed by

XWiki Development Team

Rating
Rate!
18 Votes
LicenseGNU Lesser General Public License 2.1
Bundled With

XWiki Enterprise

Installable with the Extension Manager

Description

Creating one or several Blogs

By default a recent XWiki installation will provide a blog inside the Blog space. 

Since 9.4 the multi-blog feature is supported, it provides the following options:

  • The initial set of categories located in the Blog space will be shared by all existing blogs.
  • New blog can be created anywhere on the wiki, including under nested documents.
  • By default a new set of categories is created for each newly created blog.
  • All panels of the blog application will display contextual information based on:
    • The displayed blog document, OR
    • The displayed category or set of categories
    • Newly created blog will be configured with a minimal set of panels like the initial Blog located in the Blog space.

You can use the default blog (inside Blog space) or create a new one inside a new page using the Blog's Management. For that you just need to navigate to this URL: /xwiki/bin/view/Blog/Management. A new page will show up asking you to enter:

  • The title of the Blog
  • The location of the blog in the page hierarchy 
  • The blog categories location
  • Enable/Disable displaying blog panels
  • Check to create default categories (News, Personal, Other)
  • Select the layout of the blog posts (Calendar or Image)

newBlog.png
Create a new blog

After you have filled in the information click "Create". You now have a new blog!

Creating a new Blog Post

There are currently 2 ways of creating a blog post:

  1. By going to the Blog's homepage and using the "Create a new post" input where you enter the post title and hit the "Create" button:

    createBlogPostUI.png

  2. Or by using the standard + (create page) button from anywhere inside the Blog page (or one of its children) and by selecting Blog Post as your new page's type:

    blogPostTemplateProvider.png

Post image thumbnail

Since 9.4, an image thumbnail was added to blog posts in order to allow a more visual and appealing display of blogs posts and list of blog posts.
imageThumbnail.png
Blog post image thumbnail

Useful Macros

Since 9.4, Blog Post List macro, post layout macros and Blog Post Create Macro are available, these macros can be used to query and display blog posts anywhere on the wiki.

Blog Post List Macro

The Blog Post List Macro is used to query and display blog posts anywhere on the wiki, based on some parameters, the results can be displayed using customizable post layouts.

Usage

{{blogpostlist blog="Blog.WebHome" category="Blog.News" published="yes" layout="full" layoutParams="displayTitle=false" limit="10" /}}

Parameters definition

NameOptionalAllowed valuesDefault valueDescription
blogyesa document reference The  descriptor document of a blog (It should contain a document with a Blog.BlogClass object)
categoryyesa document referenceEither a given category or a category space (not mandatory, at least blog or category mandatory)
categoryyesa document reference Either a given category or a category space (not mandatory, at least blog or category mandatory)
publishedyesyes, no, allyesLimit results to published posts
hiddenyesyes, no, allnoLimit results to hidden posts
fromDateyesstring dateLimit posts to posts published starting from a given date. The format of the date is yyyy-mm-dd.
fromDateyesstring date Limit posts to posts published starting from a given date. The format of the date is yyyy-mm-dd.
toDateyesstring dateLimit posts to posts published before a given date. The format of the date is yyyy-mm-dd.
toDateyesstring date Limit posts to posts published before a given date. The format of the date is yyyy-mm-dd.
limityesinteger10Number of posts to display
layoutyeslink,full,imagelinkThe name of the post layout macro that will be used to display the posts. The naming convention for the layout macros is: "BlogPostLayout${LayoutNameWithFirstLetterCapitalized}"
layoutParamsyesstringAdditional parameters of the blog post layout
layoutParamsyesstring Additional parameters of the blog post layout
paginatedyesyes,noif the limit parameter is not provided the itemsPerPage is extracted from the blog descriptorUsed to enble/disable the pagination of the the blogPostList macro results

Blog Post Layout Macros

Blog post layouts are wiki macros created in order to customize the layout of blog posts. Currently 3 blog post layout macros are available: blogPostLayoutLink, blogPostLayoutFull and blogPostLayoutImage.

Usage

{{blogPostLayoutFull reference="Blog.MyFirstPost" params="displayTitle=true|useSummary=true"}}

Parameters definition

NameOptionalAllowed valuesDefault valueDescription
referencenoa document reference The document reference of the blog post
paramsyesstringAdditional parameters of the blog post layout
paramsyesstring Additional parameters of the blog post layout

Examples of post layouts

linkPostLayout.png
The link post layout(BlogPostLayoutLink macro)

fullPostLayout.png
The full (default) post layout(BlogPostLayoutFull macro)

imagePostLayout.png
The image post layout(BlogPostLayoutImage macro)

How to configure a new blog post layout?

  • Create the blog post layout using this naming convention: "BlogPostLayout${LayoutNameWithFirstLetterCapitalized}"
    eg: SomePage.BlogPostLayoutMyLayout
  • Configure a given blog to use the new layout
    • Edit the Blog.BlogClass, and for the field postsLayout, add the new layout name to the static list (|myLayout=My layout)
    • Edit the descriptor of your blog, and in the BlogClass object, change the layout to the new one.

Blog Post Create Macro

The Blog Post Create macro is used to insert a post creation form anywhere on the wiki. The macro takes a blog descriptor document as parameter. The new blog posts will belongs to the blog specified in the parameter.

blogPostCreate.png
The blog post create macro

RSS Feed for the Blog

In order to display the RSS Feed icon on your blog you have to add this line:

to the Blog's Presentation HTTP Meta Information text area. You can reach that by clicking on Administration -> Administer Space: 'Blog Space Name' -> Page Elements.

If you want to provide feeds based on the Blog's Categories then drag the Blog Categories Panel onto your blog's sidebar. You can find that by selecting Administration -> Administer Space: 'Blog Space Name' -> Panel Wizard.

Examples

The blog application is used for example on the Blog page of xwiki.org.

It is also possible to customize the Blog application for specific purposes. You will need some Velocity knowledge to do this, so please check the Developer's Guide for more information.

You can add / change blog categories on the http:///xwiki/bin/view/Blog/ManageCategories page. 

A panel that lists all blog categories is also available. You can find it on the http:///xwiki/bin/view/Blog/CategoriesPanel page of your XWiki.

Screenshots

BlogPanel.png
The Blog Categories Panel

BlogArticle.png
A Blog Article

XWikiBlog.png
A Blog Main Page

Since 9.4, Blogs panel is proposed to display all blogs sharing a same set of categories

blogsPanel.png
Blogs panel

Notifications

Since 9.2, users can observe the Blog Application in their notifications preferences:

NotificationSettings.png

Then, when a blog post is published, a notification is displayed on the top menu.

Notification.png

Changing the Style

The blog application uses a Skin Extension stored as an object attached to the Blog.BlogStyle document. In order to modify the Blog's style edit this document in Object Mode and modify the style as you wish.

Tested on

This extension has been tested with the following configurations.

Extension VersionXWiki FlavorNotes
9.1.2XWiki Enterprise 9.1.2

Prerequisites & Installation Instructions

We recommend using the Extension Manager to install this extension (Make sure that the text "Installable with the Extension Manager" is displayed at the top right location on this page to know if this extension can be installed with the Extension Manager). Note that installing Extensions when being offline is currently not supported and you'd need to use some complex manual method.

You can also use the following manual method, which is useful if this extension cannot be installed with the Extension Manager or if you're using an old version of XWiki that doesn't have the Extension Manager:

  1. Log in the wiki with a user having Administration rights
  2. Go to the Administration page and select the Import category
  3. Follow the on-screen instructions to upload the downloaded XAR
  4. Click on the uploaded XAR and follow the instructions
  5. You'll also need to install all dependent Extensions that are not already installed in your wiki

Release Notes

v9.3.3

v9.4

v9.3.2

v9.3.3

v9.3.1

v9.3.2

v9.3

v9.3.1

v9.3

Dependencies

Dependencies for this extension (org.xwiki.contrib.blog:application-blog-ui 9.4):

Get Connected