如何使用选项拆分来控制typo3菜单属性? [英] How to use option split to control typo3 menu properties?

查看:87
本文介绍了如何使用选项拆分来控制typo3菜单属性?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试解决typo3中的一个设计问题.从本质上讲,我必须实现从目录生成的选项卡式菜单(仅活动状态为选项卡式),但是每个活动(选项卡式)菜单必须具有不同的bg颜色(与选项卡主体框匹配).我最初选择使用TMENU,但较早时介绍了optionsplit功能来实现此目的,但我想不出使用TMENU来实现此目的的方式,因此我目前正在尝试使用GMENU,但是我做对了.结果.下面是我当前的代码,它给了我空白.我正在尝试复制选项卡图像并将图像中的文本居中,但是使用optionsplit复制文件.

I am trying to resolve a design issue implementation in typo3. Essentially I have to implement a tabbed menu (only the active state is tabbed) that's generated from the directory, but each active (tabbed) menu has to have a different bg colour (matching the tab body box). I opted to use a TMENU initially but was introduced to the optionsplit functionality earlier as a way to achieve this but I can't think of a way achieve this using a TMENU so I am currently experimenting with GMENU, however I am not getting the right results. Below is my current code which gives me blank white spaces. I am experimenting with copying the tab images and centralising the text within the image, but using an optionsplit to copy the files.

temp.navmenu1 = HMENU
special = directory
special.value = {$idMenu}
entryLevel = 1
temp.navmenu1.1 = GMENU

temp.navmenu1.1 {
  NO = 1
  NO{
  NO.Wrap = <ul style="display: inline; "> | </ul>
  backColor = #d9d9d9
    10 = TEXT
    10.text.field = title
    10.offset = 0,5
    10.align = center
    10.niceText = 1
  }
  ACT < .NO
  ACT{
      XY = [4.w],[4.h]

      4 = IMAGE
      4.file = {$hmtab}|*|{$midtab}|*|{$endtab}
    }

}

# Temp items aren't rendered, so let's copy it into a TSOP
tv.navmenu1 < temp.navmenu1

page = PAGE
page.typeNum = 0
page.10 = USER
page.10.userFunc = tx_templavoila_pi1->main_page

推荐答案

我认为新站点不再使用GMENU.相反,您应该将TMENU与CSS一起使用.

I do not think a new site should use GMENU any more. Instead you should use TMENU with CSS.

这是一个入门的基本示例:

Here is a basic example that should get you started:

10 = HMENU
10 {
  special = directory
    # start with pid 3
  special.value = 3
  1 = TMENU
  1 {
    expAll = 1
    wrap = <ul>|</ul>
    NO = 1
    NO {
      wrapItemAndSub = <li>|</li>
      ATagTitle = abstract // description // title
    }
    ACT < .NO
    ACT.wrapItemAndSub = <li class="active">|</li>
    CUR < .NO
    CUR.wrapItemAndSub = <li class="current">|</li>
  }
  2 < .1
  3 < .1
  4 < .1
  4.wrap = <ul class="level-4">|</li>
}

当然,您现在可以将option split用于wrapItemAndSub,如下所示:wrapItemAndSub = <li class="first">|</li> |*| <li class="normal">|</li> |*| <li class="last">|</li>

Of course you can now use option split for wrapItemAndSub like so: wrapItemAndSub = <li class="first">|</li> |*| <li class="normal">|</li> |*| <li class="last">|</li>

其余的只是普通的CSS.

The rest in then just normal CSS.

这篇关于如何使用选项拆分来控制typo3菜单属性?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆