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. Back-office Reference
  3. Collections
  4. Contents
  5. Short Tags Reference
  6. [div:] Short Tag

[div:] Short Tag

Built-in Feature

This short tag allows grouping paragraphs into a <div> and apply some CSS classes.

Note: [div:.optional.classnames:optional_param1=value1&optional_param2=value2]...[/div] generates a block element (<div class="optional classnames" data-display-condition="optional_param1=value1&optional_param2=value2">...</div>) and cannot appear inside a paragraph. (b2evolution will automatically move it out of the paragraph).

Syntax Breakdown

[div [ :. Class Name(s) : Display condition(s) ] ] … [/div]

  • Class Name(s) : Optional CSS class name(s). The class name must start with a dot. Multiple class names can be specified, separated by a dot. See CSS Classes
  • Display condition(s) : Optional display condition(s). Multiple conditions should be separated by &, example: cur=usd&dur=1mo. Use Param Switcher Widget to switch between blocks with conditions.

Examples

[div:.optional.classnames:cur=usd&dur=1mo]USD content for 1 Month[/div]
[div:.optional.classnames:cur=usd&dur=6mo]USD content for 6 Months[/div]
[div:.optional.classnames:cur=eur&dur=1mo]EUR content for 1 Month[/div]
[div:.optional.classnames:cur=eur&dur=6mo]EUR content for 6 Months[/div]

will be rendered like:

<div data-display-condition="cur=usd&dur=1mo" class="optional classnames">USD content for 1 Month</div>
<div data-display-condition="cur=usd&dur=6mo" class="optional classnames">USD content for 6 Months</div>
<div data-display-condition="cur=eur&dur=1mo" class="optional classnames">EUR content for 1 Month</div>
<div data-display-condition="cur=eur&dur=6mo" class="optional classnames">EUR content for 6 Months</div>
Created by fplanque • Last edit by yurabakhtin on 2020-04-08 14:36 • •

No feedback yet

On this page

  • Built-in Feature
  • Syntax Breakdown
  • Examples

Search the Manual

Content Hierarchy

  • b2evolution CMS User Manual
  • User's Guide
  • Installation / Upgrade
  • Front-office Reference
  • Back-office Reference
    • Site
    • Collections
      • Collection Dashboard
      • Contents
        • Post Browsing Screens
        • Post Edit Screen
        • Short Tags Reference
          • Helper CSS Classes
          • Custom Fields Short Tags
          • [audio:]
          • [cblock:]
          • [div:]
          • [emailcapture:]
          • [file:]
          • [image:]
          • [include:]
          • [inline:]
          • [pagebreak]
          • [poll:]
          • [subscribe:]
          • [switcher:]
          • [teaserbreak]
          • [thumbnail:]
          • [video:]
        • Post Concepts
        • Mass Edit
        • Mass Post Contents
        • Other post actions
        • Renderers Reference
      • Comments
      • Categories
      • Features
      • Skins
      • Widgets
      • Settings
      • Creating a new collection
    • Files
    • Analytics
    • Users
    • Messages
    • Emails
    • System
    • Working with Results Tables
  • Developer Reference
  • Operations Reference
  • Advanced Topics
  • Glossary
  • Archives
Community software

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