Personal tools
Views

User Handbook/Developers Guide/Add Menu Item Subtext

From CMSMS

Add Menu Item Subtext

Menu items in CMS Made Simple are, initially, limited to a single link with no option for secondary (non-linked) descriptive text. By modifying a couple files in your CMS Made Simple installation, you can have easily editable menu subtext:

  • /lib/classes/contenttypes/Content.inc.php

Move the Title Attribute text field, located on line 244 (seen below), immediately under the Menu Text text field, located on line 200:

$ret[]= array(lang('titleattribute').':','<input type="text" name="titleattribute" maxlength="255" size="80" value="'.cms_htmlentities($this->mTitleAttribute).'" />');

Moving the Title Attribute text field places it on the Main tab of the Edit Content page, making it easier for users to locate and modify. The next modification will change the text field's label to better indicate its new use:

  • /admin/lang/en_US/admin.inc.php

Edit line 438 (seen below):

$lang['admin']['titleattribute'] = 'Description (title attribute)';

To say:

$lang['admin']['titleattribute'] = 'Menu Subtext';

Now, users will know that they can add in additional descriptive text to their page's menu item by modifying the Menu Subtext text field.

To include the menu subtext in your menus, include {$node->titleattribute} in your menu's template wherever you want the descriptive text to be shown. --MasterKale 12:53, 10 July 2007 (CDT)