Theme tags

robiso edited this page Feb 25, 2018 · 15 revisions

Bolded theme tags below (7) are necessary and vital for creating a basic theme

  • <?=wCMS::settings()?> - returns the settings panel
  • <?=wCMS::page('content')?> - returns current page content
  • <?=wCMS::js()?> - returns admin and plugin JavaScript files
  • <?=wCMS::css()?> - returns admin and plugin CSS files
  • <?=wCMS::asset('css/style.css')?> - returns CSS file to currently active theme
  • <?=wCMS::alerts()?> - returns alerts and success/error messages
  • <?=wCMS::footer()?> - returns website footer
  • <?=wCMS::get('config','siteTitle')?> - returns website title
  • <?=wCMS::page('title')?> - returns current page title
  • <?=wCMS::page('description')?> - returns current page description
  • <?=wCMS::page('keywords')?> - returns current page keywords
  • <?=wCMS::url()?> - returns homepage URL
  • <?=wCMS::menu()?> - returns each menu item as list item - example: <li><a href="//">home</a></li>
  • <?=wCMS::block('subside')?> - returns editable block named subside from database

3 necessary JavaScript libraries to make WonderCMS work seamlessly

<link rel="stylesheet" href="" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">

  • Description: Bootstrap CSS file
    • Location: between the <head></head> tags

<script src="" integrity="sha384-nvAa0+6Qg9clwYCGGPpDQLVpLNn0fRaROjHqs13t4Ggj3Ez50XnGQqc/r8MhnRDZ" crossorigin="anonymous"></script>

  • Description: jQuery library file
    • Location: before ending the </body>tag

<script src="" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>

  • Description: Bootstrap JavaScript library file
    • Location: before ending the </body>tag

Example of a theme.php file with ALL tags above

<!DOCTYPE html>
<html lang="en">
	<meta charset="UTF-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<title><?=wCMS::get('config','siteTitle')?> - <?=wCMS::page('title')?></title>
	<meta name="description" content="<?=wCMS::page('description')?>">
	<meta name="keywords" content="<?=wCMS::page('keywords')?>">
	<link rel="stylesheet" href="" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
	<link rel="stylesheet" href="<?=wCMS::asset('css/style.css')?>">


	<nav class="navbar navbar-default">
		<div class="container">
			<div class="navbar-header">
				<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#menu-collapse">
					<span class="icon-bar"></span><span class="icon-bar"></span><span class="icon-bar"></span>
				<a class="navbar-brand" href="<?=wCMS::url()?>">

			<div class="collapse navbar-collapse" id="menu-collapse">
				<ul class="nav navbar-nav navbar-right">


	<div class="container">
		<div class="row">
			<div class="col-lg-12 text-center padding40">


	<div class="container-fluid blueBackground whiteFont">
		<div class="row">
			<div class="col-lg-12 text-center padding40">


	<footer class="container-fluid">
		<div class="text-right padding20">


	<script src="" integrity="sha256-ZosEbRLbNQzLpnKIkEdrPv7lOy9C27hHQ+Xp8a4MxAQ=" crossorigin="anonymous"></script>
	<script src="" integrity="sha256-U5ZEeKfGNOja007MMD3YBI0A3OSZOQbeG6z2f2Y0hu8=" crossorigin="anonymous"></script>
Clone this wiki locally
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.