e107 Developer Guide
  • Welcome
  • Getting Started
    • Hello world example
    • Folder structure
    • Database structure
    • Debugging & problem solving
  • Classes and methods
    • Introduction
    • Alerts
    • Cache
    • CSS
    • Database
    • Date
    • Events
    • Forms
    • Javascript
    • Language
    • Logging
    • Meta
    • Parser
    • Plugins
    • Preferences
    • Redirection
    • Render
    • Route
    • URLs
    • User Data
  • Plugin development
    • Introduction
    • Plugin Builder
    • Admin-UI (User Interface)
    • Installation & configuration
    • Plugin shortcodes
    • Internationalisation (LAN)
    • Extending core functionality (addons)
    • Upgrading legacy plugins
  • Theme development
    • Introduction
    • Installation & configuration
    • Layout & templates
    • Theme Shortcodes
    • Styling (CSS)
    • Upgrading legacy themes
  • Templates, shortcodes & constants
    • Introduction
    • Templates
    • Shortcodes
    • Core Shortcodes
    • Constants
  • How-to's / FAQs
    • How to...
Powered by GitBook
On this page
  • Introduction
  • Common theme shortcodes
  • theme_shortcodes.php

Was this helpful?

Export as PDF
  1. Theme development

Theme Shortcodes

PreviousLayout & templatesNextStyling (CSS)

Last updated 4 years ago

Was this helpful?

Please note: This page is under construction and has not been finished yet.

Introduction

......

Common theme shortcodes

Please refer the the section

theme_shortcodes.php

TIP: As of e107 v2.x, you no longer need separate xxxxxx.sc files inside your theme's folder. You can now include all your theme-specific shortcodes in a single file called .

These shortcodes may be used in your theme.html and layout/xxx _layout.html files which reside inside your theme's folder. eg. Using the example below: {MY_SHORTCODE} and {MY_OTHER_SHORTCODE} will be substituted with "Something" and "Something else".

class theme_shortcodes extends e_shortcode
{
	
    function sc_my_shortcode()
    {
        return "Something";
    }

    function sc_my_other_shortcode()
    {
        return "Something else";
    }

}
👍
theme_shortcodes.php
Theme shortcodes