Advanced customization of blogs and posts

Updated on 27-February-2017 at 5:04 PM

Business Catalyst End of life announcement - find out more details.

Truncating blog posts

To display a short portion of blog posts, rather than showing the entire entry, follow these steps:

  1. Access the blog layouts by choosing Admin >Site Manager > Module Templates, then select the Blog Layouts icon.
  2. On the following screen, select Blog Post Details Layout .
  3. Replace the {tag_blogpostbody} with this tag: {tag_blogpostbodypreview}. The body preview tag will only display the first element of your blog post.  For example, if your blog post code looks like this: 
    The page will now only display the first set of <p> tags and its content. Visitors can click the link to view the entire blog post details view. 
  4. If desired, you can extend the tag to customize the link that appears, which allows users to jump from the preview version of the post to the full version.  For example, add this tag to include a link to the full post: 

Customizing Tag clouds on Blogs

To display the tag cloud on your blog, you need to add the appropriate tag. Follow these steps:

  1. In the Admin Console, choose Admin > Site Manager > Module Templates. Select the Blog Layouts icon. Then, select the Overall Blog Layout .
  2. Use the Tag Insert menu to insert one or both of the following tags: {tag_blogtagcloud} and {tag_blogtaglist}

The system will apply the various CSS classes to these tags depending on the usage of the tag. The CSS classes available in descending order are as below:

  • BlogTagCloud-XX-Large
  • BlogTagCloud-X-Large
  • BlogTagCloud-Large
  • BlogTagCloud-Medium
  • BlogTagCloud-Small
  • BlogTagCloud-X-Small
  • BlogTagCloud-XX-Small

Using these classes, you can then style the tags in the cloud, for example:

Setting the number of Posts to display

You can edit the blog tags to specify the number of posts that are displayed on a page. For example: {tag_postlist,number of posts} (found on the Overall Blog Layout ) can be edited to look like this: {tag_postlist,20} and will display the 20 most recent blog posts.

Showing the post's author

From the "Author" drop-down in the blog post panel you can select the blog's author. The author has to be one of the site's Admin users. You can display a Blog post author's biography and profile picture within the Blog post list and details layouts. To do this, go to Admin > Site Manager > Module Templates > Blog Layouts. Then select either Blog Post List Layout or Blog Post Details Layout depending on where you would like to display the author details. Within these layouts, you can add the below tags:

{tag_blogpostauthorbiography} Displays the author's biography
{tag_blogpostauthorpictureurl} Will render the picture url (relative to site root). e,g /images/profile.jpg
{tag_blogpostauthorpicture} Will render the full HTML image tag of the authors profile picture. e.g  <a href="">