Portal Engine
Version 3.x > Portal Engine > Kentico blog questions View modes: 
User avatar
Member
Member
sashi1977-hotmail - 1/20/2009 8:35:12 PM
   
Kentico blog questions
Hi,

Have some questions regarding customisation of the blog engine:

1. How do I format the comments HTML that appear in a blog post document? I was looking for a Comments transformation option in the Web Part customisation, but couldn't find any such option. Do I have to edit the codes manually in an ASPX file?

2. I need to present the blog archives in the form of a Calendar. How do I use the Calendar web part and bind it to the blog posts? Or do I have to create a custom web part for this?

For both the above, I'm using the Corporate Site template for testing.

Thanks in advance!
-sash

User avatar
Member
Member
sashi1977-hotmail - 1/23/2009 2:49:44 AM
   
RE:Kentico blog questions
Hi,

In addition to my previous questions, I'd also like to know if it's possible to add tags and file blog posts under categories?

Thanks,
-sashi

User avatar
Member
Member
Elijah - 1/24/2009 8:20:08 AM
   
RE:Kentico blog questions
In regard to tags and categories, version 4.0 appears to support those concepts natively.

For pre-4.0, however, you can still do this, just with a little more work. I haven't implemented Categories on my site, but here's how I did tags:

First I added a new text field to the blog post document type, called BlogPostTags. Then for each post I enter a comma separated list of tags in this field (optional).

I then wrote a static method in my utility library (App_Code\<SiteName>\Util.cs) to accept a comma separated list and return a list of links (with the specified tag as a "tag" querystring parameter) to the "find by tag" page that I created.

In any transformation, I can use a bit of code like this:

<%# Util.GetTagLinks(Eval("BlogPostTags")) %>

Then on the "find by tag" page, I placed a repeater that has a "where" clause that says something like this: BlogPostTags LIKE '%{%tag%}%'

You can see this in action here:
http://www.elijahtaylor.com/Blog/Find-By-Tag.aspx?tag=seth

Hope this helps!
Elijah

User avatar
Kentico Developer
Kentico Developer
kentico_ondrejv - 1/26/2009 7:39:26 AM
   
RE:Kentico blog questions
Hi,

1. Since 'Comment View' webpart uses '~\CMSBlog\BlogCommentDetail.ascx' user control, you may need to edit your comments directly in that file.

2. Regarding the blog posts in calendar - you can use standard Event Calendar webpart. You need to modify it's properties and transformation in following way:

Path: path to your blog posts
Day field: BlogPostDate
Document types: CMS.BlogPost

And edit the Transformation, e.g.: <div class="ContentEvent"><a href='<%# GetDocumentUrl() %>'><%# Eval("BlogPostTitle") %></a></div>

Please delete then the 'Event detail transformation name'.

Please note that you can adjust the other parameters according your needs.

Best regards,
Ondrej Vasil