b2evolution b2evolution

  • Sign in
  • Sign up
  • About
  • Downloads
  • Hosting
  • Docs
  • Support
  • Sign in
  • Sign up
  • Manuals Home
  • Latest Updates
 
  1. b2evolution CMS User Manual
  2. Glossary
  3. Generic vocabulary
  4. Content Block

Content Block

A "Content Block" is a piece of content, similar to a post (with text, inline images, an owner, a revision history etc.) that can be included in other places of a site.

Where to use a content block

A content block could be included in places like this:

  • Included as a section of a home page, like "About Us" or "Disclaimer" or a pricing table etc. A home page could have many sections (possibly with photo backgrounds) and people could scroll down, down, down…
  • Displayed in a widget anywhere… See the Content Block Widget
  • Included in another post. For example if we have a "WARNING: blah blah blah" paragraph that needs to be repeated over and over in a book/manual or a disclaimer that needs to be added to every post of an investment related blog… It could be written once and any update would update all affected pages. This can be achieved with a short tag like [include:123] (using the content block ID) or [include:slug] (using the content block slug). See: [include:] Short Tag. Note: the content block will be rendered with its own renderer plugins which may be different from the parent post.

Differences between content blocks and regular posts

Contents Blocks are a special Item Usage. They are similar to Posts but there are some key distinctions:

  • Content blocks have a Slug to identify them but they can never be called by themselves through an URL. They can only be embedded in something else.
  • Content blocks have no comments.
  • Content blocks have no category/chapter. (internally they are stored in the default category)
  • No excerpt
  • No Goal tracking
  • No notifications
  • No <title> and no <meta> tags

Recursive includes

Note: content blocks may include other content blocks.

If b2evolution detects a loop it will display an error on screen like "Content inclusion loop detected. Not including "%s"."

Custom fields and other short tags

If you are using a content block as a pattern displaying Custom Fields, you probably want to display the fields of the caller, not the fields of the content block itself…

So, if you do not want [field:x] to resolve in the content-block, you can change it to [-field:x]. Then it will resolve one level higher.

If you include a content block which itself includes a content block, etc. , you can control how many levels higher up you want the field to resolve by using [--field:x], [---field:x], etc.

This also works for other short tags like [-fields] , [-parent:…], etc.

Created by fplanque • Last edit by fplanque on 2020-01-24 18:25 • •

No feedback yet

On this page

  • Where to use a content block
  • Differences between content blocks and regular posts
  • Recursive includes
  • Custom fields and other short tags

Search the Manual

Content Hierarchy

  • b2evolution CMS User Manual
  • User's Guide
  • Installation / Upgrade
  • Front-office Reference
  • Back-office Reference
  • Developer Reference
  • Operations Reference
  • Advanced Topics
  • Glossary
    • All terms
    • Blog vocabulary
    • CMS vocabulary
    • Emailing vocabulary
    • Forum vocabulary
    • Generic vocabulary
      • API
      • Admin Interface
      • After more position
      • Anonymous User
      • Author
      • Back-Link
      • Back-Office
      • Base URL
      • Bubble Tips
      • CamelCase
      • Category
      • Collection
      • Collection Admin
      • Collection Member
      • Collection Owner
      • Collection Template List
      • Comment
      • Container
      • Content Block
      • Content Moderator
      • Cover position
      • DB
      • Datetime
      • Editor
      • Extra Categories
      • FTP
      • Fallback position
      • File Root
      • Front Office
      • Front Page
      • Full-Access Collection Admins
      • Group Level
      • Home Page
      • Info Page
      • Info Page
      • Inline position
      • Intro Post
      • Intro-Sub
      • Intro-Tag
      • Issue Date
      • Item
      • Item Tag
      • Item Types
      • Item Usage
      • Keyboard Shortcuts
      • Logged-in User
      • Main Category
      • Mass Edit
      • Meta Category
      • Meta Comments
      • Moderator
      • Owner
      • PHP
      • Permalink
      • Ping
      • Post
      • Post ID
      • Private Message
      • Quick moderation
      • Recently Edited Posts
      • Renderer Plugins
      • Request Title
      • Section
      • Site Admin or System Admin
      • Site Member or Authenticated User
      • Site Visitor
      • Skin or evoSkin
      • Skins Repository
      • Slug
      • Standalone Page
      • Stub File
      • Teaser
      • Teaser position
      • Themes
      • Tiny Slug
      • UI
      • User Account
      • User Admin
      • User Community
      • User Group
      • User Level
      • User Moderator
      • User Permissions
      • Website
      • Widget
      • Widget Page
      • Workflow
      • evoBar
    • Manual vocabulary
    • Technical vocabulary
  • Archives
Web Site Builder

This online manual is powered by b2evolution CMS – A complete engine for your website.

About b2evolution

  • What is it?
  • Features
  • Getting Started
  • Screenshots
  • Online demo
  • Testimonials
  • Design philosophy
  • Free & open source
  • Terms of service

Downloads

  • Latest releases
  • Skins
  • Plugins
  • Language packs

About us

  • About us
  • Contact

Webhosting Guide

  • Web hosting blog
  • Best web hosting
  • Cheap web hosting
  • Green web hosting
  • Hosting with SSH
  • VPS hosting
  • Dedicated servers
  • Reseller hosting
  • Int'l: UK / France

Docs & Support

  • Online manual
  • Forums
  • Hire a pro !

Other

  • Adsense
  • Press room
  • Privacy policy

Stay in touch

  • GitHub
  • Twitter
  • Facebook
  • LinkedIn
  • News blog
  • RSS feed
  • Atom feed

Founded & Maintained by François Planque