Hello friends, here I leave my first design for this CMS, in this case it is very simple but nice
*Contains an easy to use advertising system
Installation:
- Move the folder "redtheme" to the folder "themes"
How do we edit the menu from that file?wiz wrote:Hello bpsysgamer, and welcome to the community!
Thank you for your contribution, but there is currently one issue with your theme - index.php should never not be changed, as WonderCMS rewrites it when updating. Please use the functions.php file (as described here) to include any extra functions, so the users will be able to update their index.php normally - through our one click updater.
Thanks again and welcome!
Code: Select all
wCMS::addListener('navigation', 'overrideNavigation');
function overrideNavigation ($args) {
$output = '';
foreach (wCMS::getConfig('menuItems') as $item) {
$output .= '<li class="nav-item"><a '.((mb_strtolower($item) == wCMS::$currentPage) ? ' class="active nav-link"' : '').'class="nav-link text-inverse" href="'.wCMS::url(wCMS::getSlug($item)).'">'.$item.'</a></li>';
}
$args[0] = $output;
return $args;
}
Code: Select all
<?php
wCMS::addListener('navigation', 'overrideNavigation');
function overrideNavigation ($args) {
$output = '';
foreach (wCMS::getConfig('menuItems') as $item) {
$output .= '<li class="nav-item"><a '.((mb_strtolower($item) == wCMS::$currentPage) ? ' class="active nav-link"' : '').'class="nav-link text-inverse" href="'.wCMS::url(wCMS::getSlug($item)).'">'.$item.'</a></li>';
}
$args[0] = $output;
return $args;
}
function AdvertisingArea() {
// Check if the AdvertisingArea area is already exists, if not, create it.
if (wCMS::getConfig('AdvertisingArea') === false) {
wCMS::setConfig('AdvertisingArea', '<a href="https://join-adf.ly/252596"><img border="0" src="https://cdn.adf.ly/images/banners/adfly.160x600.4.gif" width="160" height="600" title="AdF.ly - acorta links y gana dinero!" /></a>');
}
// Fetch the value of AdvertisingArea from the database.
$value = wCMS::getConfig('AdvertisingArea');
// If value is empty, let's put something in it by default. (IMPORTANT)
if (empty($value)) {
$value = 'Empty content.';
}
// It's necessary to pass the editable method to the fetched value/content
// to make the area editable ONLY if admin is logged in.
if (wCMS::$loggedIn) {
// If logged in, it must be editable
return wCMS::editable('AdvertisingArea', $value);
}
// If not logged in, don't make it editable!
return $value;
}
?>