<i id='jIwhI'><tr id='jIwhI'><dt id='jIwhI'><q id='jIwhI'><span id='jIwhI'><b id='jIwhI'><form id='jIwhI'><ins id='jIwhI'></ins><ul id='jIwhI'></ul><sub id='jIwhI'></sub></form><legend id='jIwhI'></legend><bdo id='jIwhI'><pre id='jIwhI'><center id='jIwhI'></center></pre></bdo></b><th id='jIwhI'></th></span></q></dt></tr></i><div id='jIwhI'><tfoot id='jIwhI'></tfoot><dl id='jIwhI'><fieldset id='jIwhI'></fieldset></dl></div>
  • <small id='jIwhI'></small><noframes id='jIwhI'>

      <legend id='jIwhI'><style id='jIwhI'><dir id='jIwhI'><q id='jIwhI'></q></dir></style></legend>
      <tfoot id='jIwhI'></tfoot>

          <bdo id='jIwhI'></bdo><ul id='jIwhI'></ul>

      1. 外部页面中的 Joomla 菜单

        时间:2023-10-16

              <bdo id='RHouH'></bdo><ul id='RHouH'></ul>
              <tfoot id='RHouH'></tfoot>
              <i id='RHouH'><tr id='RHouH'><dt id='RHouH'><q id='RHouH'><span id='RHouH'><b id='RHouH'><form id='RHouH'><ins id='RHouH'></ins><ul id='RHouH'></ul><sub id='RHouH'></sub></form><legend id='RHouH'></legend><bdo id='RHouH'><pre id='RHouH'><center id='RHouH'></center></pre></bdo></b><th id='RHouH'></th></span></q></dt></tr></i><div id='RHouH'><tfoot id='RHouH'></tfoot><dl id='RHouH'><fieldset id='RHouH'></fieldset></dl></div>
                <tbody id='RHouH'></tbody>

                • <small id='RHouH'></small><noframes id='RHouH'>

                  <legend id='RHouH'><style id='RHouH'><dir id='RHouH'><q id='RHouH'></q></dir></style></legend>
                  本文介绍了外部页面中的 Joomla 菜单的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  I am trying to re-create the menu items from main menu in Joomla in a page, which is outside Joomla's template folder.

                  Are there any method available, such as 'wp_nav_menu' in Wordpress, which would help me to generate the Menu.

                  解决方案

                  There are two steps that you will need to follow

                  First, make your external page capable of running joomla library. To do this you will need to include few lines of code in your external php page

                  define( '_JEXEC', 1 );
                  define('JPATH_BASE', dirname(__FILE__).'/../../../../' );   // should point to joomla root
                  define( 'DS', DIRECTORY_SEPARATOR );
                  require_once ( JPATH_BASE .DS.'includes'.DS.'defines.php' );
                  require_once ( JPATH_BASE .DS.'includes'.DS.'framework.php' );
                  $mainframe =& JFactory::getApplication('site');
                  $mainframe->initialise();
                  

                  Second, Create a menu module for your desired menu and enable it on a custom position say 'xxxx' and then put the following code where you want the put that menu

                  jimport( 'joomla.application.module.helper' );
                  $module = JModuleHelper::getModules('xxxx');
                  // xxxx is any virtual position, no need to create it anywhere.
                  echo JModuleHelper::renderModule($module[0]);
                  

                  这篇关于外部页面中的 Joomla 菜单的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:Joomla 2.5 中基于类别的文章的替代布局 下一篇:Joomla 页面中的自定义 php 代码

                  相关文章

                  <legend id='yyJBR'><style id='yyJBR'><dir id='yyJBR'><q id='yyJBR'></q></dir></style></legend>

                • <i id='yyJBR'><tr id='yyJBR'><dt id='yyJBR'><q id='yyJBR'><span id='yyJBR'><b id='yyJBR'><form id='yyJBR'><ins id='yyJBR'></ins><ul id='yyJBR'></ul><sub id='yyJBR'></sub></form><legend id='yyJBR'></legend><bdo id='yyJBR'><pre id='yyJBR'><center id='yyJBR'></center></pre></bdo></b><th id='yyJBR'></th></span></q></dt></tr></i><div id='yyJBR'><tfoot id='yyJBR'></tfoot><dl id='yyJBR'><fieldset id='yyJBR'></fieldset></dl></div>

                  1. <tfoot id='yyJBR'></tfoot>

                      <bdo id='yyJBR'></bdo><ul id='yyJBR'></ul>

                      <small id='yyJBR'></small><noframes id='yyJBR'>