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. Developer Reference
  3. Website Skins/Themes
  4. Skin Tags / API
  5. Tag Skin Container

Tag Skin Container

This template tag adds a widget container to the skin. This container can later be filled with all sorts of Widget.

Example


  <?php
     // ------------------------- "Sidebar" CONTAINER EMBEDDED HERE --------------------------
     // Display container contents:
     skin_container( NT_('Sidebar'), array(
         // The following (optional) params will be used as defaults for widgets included in this container:
         // This will enclose each widget in a block:
         'block_start' => '<div class="bSideItem $wi_class$">',
         'block_end' => '</div>',
         // This will enclose the title of each widget:
         'block_title_start' => '<h3>',
         'block_title_end' => '</h3>',
         // If a widget displays a list, this will enclose that list:
         'list_start' => '<ul>',
         'list_end' => '</ul>',
         // This will enclose each item in a list:
         'item_start' => '<li>',
         'item_end' => '</li>',
         // This will enclose sub-lists in a list:
         'group_start' => '<ul>',
         'group_end' => '</ul>',
         // This will enclose (foot)notes:
         'notes_start' => '<div class="notes">',
         'notes_end' => '</div>',
       ) );
    // ----------------------------- END OF "Sidebar" CONTAINER -----------------------------
  ?>

Parameters

This template tag takes two parameters:

  1. The name of the container
  2. An array of extra parameters

Container name

You can basically use any container name you want and create as many containers as you wish. However, for common containers it is best to use the common names, such as NT_(’Header’) and NT_(’Sidebar’).

Note: NT_() is for translation to other languages. It doesn’t hurt to use it even if you don’t care about translation.

Using standard names will ensure that bloggers don’t lose their widgets + widget configurations when they switch from one skin to another.

For multiple sidebars, please use:

  • NT_(’Sidebar’)
  • NT_(’Sidebar 2′)
  • NT_(’Sidebar 3′)
  • etc.

Numbering of the sidebars should typically go from left to right, top to bottom.

The reason we don’t use names such as ‘left’ and ‘right’ is:

  1. it makes less sense on a 3 column setup
  2. it makes almost no sense at all on those skins with the "sidebar" being at the bottom or the top. It is still "side" content though (in a figurative way).

Extra parameters

These parameters will be passed down to the widgets at display time. They help insure that all widgets will display themselves by using a look & feel that is consistent with the current skin design.

(In technical terms, they help insure the XHTML markup the widgets will use matches the XHTML of the skin and that all this stuff validates in the end.)

Note that $wi_class$ will be replaced with a class name unique to each widget type. This allows you to do some specific CSS for some specific widgets. You should avoid this as much as possible though.

Doing specific CSS is a little bit like doing fixed width designs. It’s easier than fluid designs, but it’s a lot less flexible for the users.

Created by fatimahnasra • Last edit by fplanque on 2020-06-09 00:25 • •

No feedback yet

On this page

  • Example
  • Parameters
  • Container name
  • Extra parameters

Search the Manual

Content Hierarchy

  • b2evolution CMS User Manual
  • User's Guide
  • Installation / Upgrade
  • Front-office Reference
  • Back-office Reference
  • Developer Reference
    • Website Skins/Themes
      • Skin Development Primer
      • Loading additional resources into a skin
      • Where are the skin files?
      • CSS Guidelines
      • Targeted CSS Selectors
      • Introducing evoSkins
      • Modifying evoSkins
      • Creating evoSkins
      • Skin Tags / API
        • Template functions
        • Template Tags
        • Tag Plugins Call By Code
        • Tag User Subs Link
        • Tag User Register Link
        • Tag User Profile Link
        • Tag User Logout Link
        • Tag User Login Link
        • Tag Skin Get URL
        • Tag Skin Get Path
        • Tag Skin Container
        • Tag Powered By
        • Tag Is Logged In
        • Include Disp
        • Tag Display If Empty
        • Tag Comment Allowed Tags
        • Tag Blog Tagline
        • Tag Blog Name
        • Tag Blog Longdesc
        • Tag Blog Home Link
        • Tag Blog Footer
        • Tag Blog Contact Link
        • app_version();
        • Tag Request Title
        • Include Item Content
        • User::get_identity_link()
        • Item Tags
        • Category Tags
        • User Tags
        • Other Tags
      • Styling widgets
      • Skin Quality Control
      • Using HTML 5 tags
      • Using Custom Item Templates
      • Using bootstrap classes in footers
      • Using Grunt
      • Dev Menu
      • How to add a Google Font (WebFont) ?
      • Custom Fields in a Template
      • Site Skins
    • Email Skins/Themes
    • b2evolution Files
    • Website Integration
    • Plugins
    • Debugging
    • Technical Reference
    • Hacks
    • Credits
    • Development
    • How to... (Customize)
    • Scheduled Tasks Reference
  • Operations Reference
  • Advanced Topics
  • Glossary
  • Archives
Social CMS

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