[xwiki-users] Inline blog with teaser in a page
Hi, I want to embed a teasered version of the blog into a page on my XWiki as it is done on https://www.xwiki.org/xwiki/bin/view/Main/News On my page a used the same include as on xwiki.org but the blog entries are not displayed. Just get the "xe.blog.code.notblog" message. I used the default blog application (nothing special). Is any special handling/configuration required to get the teasered inline blog? {{velocity}} {{include document="Blog.BlogSheet"/}} {{/velocity}} Thanks for your help. Canny -- View this message in context: http://xwiki.475771.n2.nabble.com/Inline-blog-with-teaser-in-a-page-tp760249... Sent from the XWiki- Users mailing list archive at Nabble.com.
Hi Canny,
On 20 Jan 2017, at 08:42, Canny <[email protected]> wrote:
Hi,
I want to embed a teasered version of the blog into a page on my XWiki as it is done on https://www.xwiki.org/xwiki/bin/view/Main/News
On my page a used the same include as on xwiki.org but the blog entries are not displayed. Just get the "xe.blog.code.notblog" message. I used the default blog application (nothing special). Is any special handling/configuration required to get the teasered inline blog?
{{velocity}} {{include document="Blog.BlogSheet"/}} {{/velocity}}
You also need to add an xobject of type Blog.BlogClass to your page and set the correct “Blog type”’ xproperty to global. Thanks -Vincent
Thanks for your help.
Canny
-- View this message in context: http://xwiki.475771.n2.nabble.com/Inline-blog-with-teaser-in-a-page-tp760249... Sent from the XWiki- Users mailing list archive at Nabble.com.
Hi Vincent, adding the "Blog.BlogClass" class leads to losing the embedded mode. The hole page is now the blog overview page. Try to edit the page opens the blog overview edit page, no change to access the original content of the page where i try to embed the blog inline. I noticed that the blog entries are not teasered and the create button for a new blog post is displayed. How to get the embedding and style as on xwiki.org? Thanks, Canny -- View this message in context: http://xwiki.475771.n2.nabble.com/Inline-blog-with-teaser-in-a-page-tp760249... Sent from the XWiki- Users mailing list archive at Nabble.com.
On 20 Jan 2017, at 09:10, Canny <[email protected]> wrote:
Hi Vincent,
adding the "Blog.BlogClass" class leads to losing the embedded mode. The hole page is now the blog overview page. Try to edit the page opens the blog overview edit page, no change to access the original content of the page where i try to embed the blog inline. I noticed that the blog entries are not teasered and the create button for a new blog post is displayed. How to get the embedding and style as on xwiki.org?
Right, you also need to add an xobject of type XWiki.DocumentSheetBinding to override the class sheet binding you get from the BlogClass itself :) Thanks -Vincent
Thanks,
Canny
-- View this message in context: http://xwiki.475771.n2.nabble.com/Inline-blog-with-teaser-in-a-page-tp760249... Sent from the XWiki- Users mailing list archive at Nabble.com.
Is there a way to access the appropriate XWiki.DocumentSheetBinding configuration, as it is used xwiki.org. I miss to corrent entry point to go deep in this topic to help myself instead of asking any step. Do you have any suggestions? -- View this message in context: http://xwiki.475771.n2.nabble.com/Inline-blog-with-teaser-in-a-page-tp760249... Sent from the XWiki- Users mailing list archive at Nabble.com.
On 20 Jan 2017, at 09:18, Canny <[email protected]> wrote:
Is there a way to access the appropriate XWiki.DocumentSheetBinding configuration, as it is used xwiki.org. I miss to corrent entry point to go deep in this topic to help myself instead of asking any step. Do you have any suggestions?
There’s no “source” view for xobjects but you can get all the info from the XML view: http://www.xwiki.org/xwiki/bin/view/Main/News?xpage=xml Thanks -Vincent
-- View this message in context: http://xwiki.475771.n2.nabble.com/Inline-blog-with-teaser-in-a-page-tp760249... Sent from the XWiki- Users mailing list archive at Nabble.com.
And what is place to look for the truncation handling and remove of the blog post creation button? -- View this message in context: http://xwiki.475771.n2.nabble.com/Inline-blog-with-teaser-in-a-page-tp760249... Sent from the XWiki- Users mailing list archive at Nabble.com.
On 20 Jan 2017, at 09:57, Canny <[email protected]> wrote:
And what is place to look for the truncation handling and remove of the blog post creation button?
You need to check what BlogPostSheet does and adapt it. Ok I’ve done it for you ;) Use the following content in your page: {{include reference="Blog.BlogCode"/}} {{velocity}} {{html clean="false" wiki="true"}} #getBlogEntries($doc $entries) #displayBlog($entries 'index' true true) #displayNavigationLinks($doc) {{/html}} {{/velocity}} Thanks -Vincent
-- View this message in context: http://xwiki.475771.n2.nabble.com/Inline-blog-with-teaser-in-a-page-tp760249... Sent from the XWiki- Users mailing list archive at Nabble.com.
participants (2)
-
Canny -
Vincent Massol