简体   繁体   English

在joomla中自定义菜单布局

[英]customizing menu layout in joomla

Hey everyone. 嘿大家。 I would like to create a joomla menu but have it display in three columns, like so: 我想创建一个joomla菜单,但将其显示在三列中,如下所示:

+----------+----------+----------+
| item0    |  item1   | item2    |
| item3    |  item4   | item5    |
|  ...     |  ...     |  ...     |
|          |          |          |

For the life of me I can't think of a way to do it. 对于我的一生,我想不出办法。 Granted, I am fairly new at joomla and php, but this has me stumped. 当然,我在joomla和php上还算是新手,但这让我很困惑。 Does anyone have any suggestions? 有没有人有什么建议?

Joomla doesn't come with built-in functionality to create such a drop down menu. Joomla没有内置功能来创建这样的下拉菜单。 However, you might want to have a look at these menu plugins: 但是,您可能想看看这些菜单插件:

http://www.onestopjoomla.com/extensions/menu/ http://www.onestopjoomla.com/extensions/menu/

TO anyone who might come across this, I've come up with a hacky solution. 对于可能遇到此问题的任何人,我都提出了一个棘手的解决方案。 Then again, I'm new at this webdev stuff (doing it for ~3 months) so maybe this is typical: 再说一次,我是这个webdev的新手(大约需要3个月的时间),所以也许这很典型:

My solution: The menu buttons are to be images, and so I can rely on them being of fixed size. 我的解决方案:菜单按钮应该是图像,因此我可以依靠它们的固定大小。 That being said, I specified the width of their containing element, and get them wrapping. 话虽如此,我指定了它们包含元素的宽度,然后将它们包裹起来。 As a proof of concept to myself, I've got the following: 作为对我自己的概念证明,我得到以下几点:

<div id="example">
  <jdoc:include type="modules" name="menuposn" />
</div>

where the menu is rendered in menuposn. 在menuposn中呈现菜单的位置。 I then have this css: 然后我有这个CSS:

div#example{
  width:600px;
  overflow:auto;
}

div#example ul{
  width:600px;
  margin:0;
  padding:0;
  border:0;
}

div#example ul li{
  width:200px;
  float:left;
  margin:0;
  padding:0;
  border:0; 
}

It works! 有用!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM