<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 菜单

        Joomla Menu In External Page(外部页面中的 Joomla 菜单)

              <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 菜单的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  Is Joomla 2.5 much faster than Joomla 1.5 Querywise(Joomla 2.5 比 Joomla 1.5 Querywise 快得多吗)
                  How to share Joomla login session from one joomla website to one ASP.Net MVC website(如何将 Joomla 登录会话从一个 joomla 网站共享到一个 ASP.Net MVC 网站)
                  htaccess redirect root to subdirectory but allow index.php in root AND query strings to function(htaccess 将根重定向到子目录,但允许根和查询字符串中的 index.php 起作用)
                  Joomla include database functions(Joomla 包含数据库功能)
                  nl2br() not working when displaying SQL results(显示 SQL 结果时 nl2br() 不起作用)
                  Joomla 2.5 JFactory::getSession(); seems to be caching in firefox(Joomla 2.5 JFactory::getSession();似乎在 Firefox 中缓存)
                  <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>

                    • <tfoot id='yyJBR'></tfoot>
                        <tbody id='yyJBR'></tbody>

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

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