Core Shortcodes
2016. dec. 07.
Commonly used core theme shortcodes are listed below.
| Name | Description |
| {---} | Renders the main content of the current page. |
| { CMENU=xxxxxx } | Renders a specific custom menu item as defined in admin -> Pages/Menus. xxxxxx = menu name. |
| { LOGO } | The site's logo as defined in the admin preferences. |
| { MENU=1 } | Menu Area as allocated using the media-manager in admin. Add multiple areas by incrementing the numeric value. |
| { MENU: type=xxxxxx } | When xxxxxx is NOT a number, it will attempt to render a specific menu with the name xxxxxx. eg. { MENU=contact } will render e107_plugins/contact/contact_menu.php |
| { NAVIGATION=main } | Bootstrap-style navigation - generated from sitelinks category 'main' |
| { SETSTYLE=xxxxxx } | A special shortcode which is used to dynamically change the value of $style as used inside tablerender() to the value of xxxxxx. |
| { SETIMAGE: w=x } | A special shortcode which is used to dynamically change the size of avatars and other images. x= numerical value. |
| { SITEDESCRIPTION } | The description of the website as defined in the admin preferences. |
| { SITEDISCLAIMER } | The site disclaimer as defined in the admin preferences. Typically used in the footer of the site. |
| { SITENAME } | The name of the website as defined in the admin preferences. |
| { WMESSAGE } | Renders the welcome message as defined in admin-> Welcome Message. |
Usage example:
$LAYOUT['default'] = "
<header>{SITENAME}<header>
<div>{NAVIGATION=main}</div>
{SETSTYLE=menu}
<div class="span2">
{MENU=1}
{MENU=contact}
</div>
<div class="span10">
{SETSTYLE=default}
{---}
</div>
<footer>{SITEDISCLAIMER}</footer>
";
function tablestyle($caption, $text, $mode='')
{
global $style; // value defined by {SETSTYLE} shortcode.
switch($style)
{
case 'menu':
echo "<h5>".$caption."</h5>";
echo $text;
break;
default:
echo "<h2>".$caption."</h2>";
echo $text;
break;
}
}</header></header>
News
| Shortcode | Description |
| { NEWS_ID } | Unique ID for the current news item (news_id) |
| { NEWS_TITLE } | News Title |
| { NEWS_SUMMARY } | News item summary |
| { NEWS_DATE } | News Date |
| { NEWS_BODY } | News Body (main content) |
| { NEWS_TAGS } | New Keywords/Meta-Keywords |
| { NEWS_URL } | News URL (current URL) |
| { NEWS_CATEGORY_NAME } | News Category Name |
| { NEWS_CATEGORY_DESCRIPTION } | News Category Description |
| { NEWS_CATEGORY_ICON } | News Category Icon |
Pages (coming soon)







Hozzászólás