The following warnings occurred:
Warning [2] Undefined array key "threadviews_countguests" - Line: 745 - File: showthread.php PHP 8.1.31 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/showthread.php 745 errorHandler->error_callback
Warning [2] Undefined array key "allowautourl" - Line: 584 - File: inc/class_parser.php PHP 8.1.31 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/class_parser.php 584 errorHandler->error_callback
/inc/class_parser.php 228 postParser->parse_mycode
/inc/functions_post.php 830 postParser->parse_message
/showthread.php 916 build_postbit
Warning [2] Undefined array key "allowautourl" - Line: 584 - File: inc/class_parser.php PHP 8.1.31 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/class_parser.php 584 errorHandler->error_callback
/inc/class_parser.php 228 postParser->parse_mycode
/inc/functions_post.php 861 postParser->parse_message
/showthread.php 916 build_postbit
Warning [2] Undefined property: MyLanguage::$thread_modes - Line: 46 - File: showthread.php(1650) : eval()'d code PHP 8.1.31 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/showthread.php(1650) : eval()'d code 46 errorHandler->error_callback
/showthread.php 1650 eval




Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
QUESTION How to add subtitles to menu?
#6
Just to unpack what was said above:
  • Download the I18N Custom Fields Plugin
  • Use it to create a field with the name 'subtitle'
  • For each page that you want to have a subtitle, edit the page and give  it a value for the newly created 'subtitle' field
  • Create a component (in Theme -> Components) for your menu called 'menu_custom' with the following code:
PHP Code:
<li class="<?php echo $item->classes; ?>">
 <a href="<?php echo htmlspecialchars($item->link); ?>">
   <!--title-->
   <?php echo htmlspecialchars($item->text); ?>
   <!--subtitle-->
   <span class="subtitle"><?php echo htmlspecialchars($item->subtitle); ?></span>
 </a>
 <?php if ($item->isOpen) { ?>
   <ul><?php $item->outputChildren(); ?></ul>
 <?php ?>
</li> 
  • Whilst in Theme, edit the template for your active theme. Where your menu is supposed to be rendered (e.g. in the header template in header.inc.php or whichever template file has your navigation), replace the call to get_navigation() with:
PHP Code:
// Get the current page id
$slug get_page_slug();

// Render the custom navigation with component 'menu_custom'
get_i18n_navigation($slug00I18N_SHOW_NORMAL'menu_custom'); 
Reply


Messages In This Thread
How to add subtitles to menu? - by lukinhasb - 2014-07-12, 00:15:58
RE: How to add subtitles to menu? - by lukinhasb - 2014-07-12, 00:34:15
RE: How to add subtitles to menu? - by shawn_a - 2014-07-12, 00:54:34
RE: How to add subtitles to menu? - by cmb - 2014-07-12, 11:56:10
RE: How to add subtitles to menu? - by xuser - 2015-08-06, 20:23:02
RE: How to add subtitles to menu? - by Angryboy - 2015-08-11, 00:35:48



Users browsing this thread: 1 Guest(s)