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. Template Tags

Template Tags

This page describes the functions used within a skin template (v 2.x) in order to inject the dynamic data into your blog design.

Below is a listing of available template tags linking to a more detailed explanation for each of them. You will find getting started instructions further down on this page.

Available template tags

  • app_version();
  • blog_home_link();
  • comment_allowed_tags();
  • $Blog->name();
  • $Blog->contact_link();
  • $Blog->footer_text();
  • $Blog->longdesc();
  • $Blog->tagline();
  • credits();
  • display_if_empty();
  • locale_charset();
  • locale_lang();
  • item_prevnext_links();
  • $Item->anchor();
  • $Item->author();
  • $Item->permanent_link();
  • $Item->permanent_url();
  • $Item->can_comment();
  • $Item->can_rate();
  • $Item->can_receive_pings();
  • $Item->categories();
  • $Item->content_teaser();
  • $Item->deadline_date();
  • $Item->deadline_time();
  • $Item->deprecate_link();
  • $Item->edit_link();
  • $Item->extra_status();
  • $Item->has_feedback();
  • $Item->feedback_link();
  • $Item->feedback_feed_link();
  • $Item->feedback_moderation();
  • $Item->files();
  • $Item->locale_flag();
  • $Item->footer();
  • $Item->images();
  • $Item->issue_date();
  • $Item->lang();
  • $Item->language();
  • $Item->locale();
  • $Item->locale_temp_switch();
  • $Item->main_category();
  • $Item->mod_date();
  • $Item->mod_time();
  • $Item->more_link();
  • $Item->msgform_link();
  • $Item->msgform_link_assigned();
  • $Item->priority();
  • $Item->publish_link();
  • $Item->status();
  • $Item->status_raw();
  • $Item->tags();
  • $Item->trackback_rdf();
  • $Item->trackback_url();
  • $Item->issue_time();
  • $Item->title();
  • $Item->type();
  • $Item->views();
  • $Item->wordcount();
  • $Skin->get_path();
  • $Skin->get_url();
  • locale_restore_previous();
  • $Mainlist->page_links();
  • messages();
  • $plugins->call_by_code();
  • powered_by();
  • request_title()
  • skin_include(); *See below
  • skin_container();
  • user_login_link();
  • user_logout_link();
  • user_register_link();
  • user_profile_link();
  • user_subs_link();
  • is_logged_in();

Includes

The skin_include() template tag will include another template. Many of these templates can take parameters too:

  • skin_include( ‘_html_header.inc.php’ …
  • skin_include( ‘_item_content.inc.php’ …
  • skin_include( ‘_item_feedback.inc.php’ …
  • skin_include( ‘$disp$’ …
  • skin_include( ‘_html_footer.inc.php’ …

Other template functions you might encounter

  • skin_init();
  • mainlist_get_item();
  • while( $Item = & mainlist_get_item() ) {

A sample template tag

This is the template tag that displays the date of a post:

  $Item->issue_date( array(
      'before'      => '<span class="timestamp">',
      'after'       => '</span>',
    ) );

In the instance above, the template tag has 2 parameters ‘before’ and ‘after’. The HTML snippets that have been specified there will be added before and after the date.

You generally don’t have to pass any parameters at all if you don’t want to. In this case, default parameters will be used. With no parameters, the template tag would look like this:

  $Item->issue_date( array(
    ) );

Or it could be trimmed down even further, like this:

  $Item->issue_date();

On the contrary, you can also add parameters. For example, you could specify the date format to use, like this:

  $Item->issue_date( array(
      'before'      => '<span class="timestamp">',
      'after'       => '</span>',
      'date_format' => 'Y-m-d',
    ) );
Created by fatimahnasra • Last edit by fplanque on 2020-06-30 19:42 • •

No feedback yet

On this page

  • Available template tags
  • Includes
  • Other template functions you might encounter
  • A sample template tag

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
Community 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