Tips

Share some classes in your Stylesheet if you can among different news pages.

You can use the same technique for overview pages.

Make sure you don't break the php code in the subtemplates.

Here is a quick tip on how to set up nested or pull-down menus.

Here is what the default menu looks like in the default template:

<ul><?php foreach($menus['main'] as $item): ?>
<li>
<a href="<?php echo $item['link']; ?>" title="<?php echo $item['title']; ?>"<?php if($item['accesskey']!=''): ?> accesskey="<?php echo $item['accesskey']; ?>"<?php endif; ?><?php if(!empty($item['section']) && $item['section']==$section[0]): ?> id="current"<?php endif; ?>><span><?php echo $item['name']; ?></span></a>
</li>
<?php endforeach; ?></ul>

There are many ways to add a nested menu. Below is a simple one.

First, you need to define a new set of submenu in your settings and name the submenu name the same as one section name of the main menu.

Secondly, call menu_2 in appropriate pages.

Thirdly, add the submenu to the main menu by changing the following in your template file.

Change:
<?php if(!empty($item['section']) && $item['section']==$section[0]): ?>
To:
<?php if(!empty($item['section']) && $item['section']==$section[0]): if($menu_2&&($menu+2==$section[0]){$menu_nested=true; } ?>

Right before

</li>
<?php endforeach; ?></ul>
Add the following:

<php if($menu_nested): ?>

<ul>
<?php foreach($menus[$menu_2] as $item): ?><li><a href="<?php echo $item['link']; ?>" title="<?php echo $item['title']; ?>"<?php if($item['accesskey']!=''): ?> accesskey="<?php echo $item['accesskey']; ?>"<?php endif; ?><?php if(!empty($item['section']) && $item['section']==$section[1]): ?> id="current2"<?php endif; ?>><?php echo $item['name']; ?></a>
</li><?php endforeach; ?>
</ul>

<?php endif; ?>

You now have nested menus. Please report back if you encounter any problems.

Notice you can also create a pulldown menu with some minor changes to the above technique.

RiteCMS is an open source CMS (Content Management System) software released under GNU/GPL license. Securimage & TinyMCE are copyrighted of their respective developers. The project began in 2009 as a fork of PhpSqliteCMS.net. The project has been maintained by Lucas Zhuang. Version 3.X is a new released with new features and compatible with Php 7. It has been tested on Apache and NGINX.

While we try our best to make it run as smooth as possbile, we offer no explicit guarantee or warranty. Use at your risk.

The RiteCMS project is now maintained by Lucas Zhuang. We now accept service requests, such as server administration, RiteCMS installation, customization, etc. All reqeusts should be directed to ZoriaMedia.com.

RiteCMS website is designed in Rhode Island, USA with love.

© 2021 Lucas Zhuang & the RiteCMS project.