TYPO3 初步入门 结合 Spry Accordion Widget

| | Comments (0)

今天成功地用TYPO3的TypoScript和Spry Accordion Widget(当然还有CSS和JS)结合在一起实现了动态(会动的!)菜单。TypoScript的确是很强大,不过在 TSref 里找东西有点烦人,而且也没有很完整的教程,目前我还在处于瞎子状态中。Google找了半天发现德文资料居多,比英文还多,这倒是头一次碰到。下面是昨天发现的几个还算有点用的网站:

下面是setup的部分代码

marks.ACCORDION = HMENU
 marks.ACCORDION.special = directory
 marks.ACCORDION.special.value = 48
 marks.ACCORDION.1 = TMENU
 marks.ACCORDION.1.target = page
 marks.ACCORDION.1 {
  expAll = 1
  noBlur = 1
  wrap = |
  NO {
   wrapItemAndSub = <div class="AccordionPanel">|</div>
   linkWrap = <div class="AccordionPanelTab">|</div>
   doNotLinkIt = 1
  }
 }
 marks.ACCORDIONL.2 = TMENU
 marks.ACCORDIONL.2 {
      wrap = <div id="AccordionPanelContent1" class="AccordionPanelContent"><ul class="list1">|</ul></div>
  target = page
  noBlur =1
  NO {
   RO = 1
   ATagBeforeWrap = 1
   allWrap = <li>|</li>
   linkWrap= |
  }
 }

用.special属性生成只有pid=48的网页目录,然后生成第2级目录。

下面是template文件的代码:

<div id="Accordion1" class="Accordion">
###ACCORDIONL###
</div>

TypoScript还算比较容易上手,有1个星期基本上就没问题了。不过TYPO3实际用起来还没经验,估计要等到1,2个月后才知道了。

Leave a comment

live stream

  • Marika tweeted, "hopes to hell ES2 won't break within the next year. Of course if it breaks I would have an excuse to upgrade to EM3 pro. - Photo: htt..."
  • Marika tweeted, "Um..... unplugged the cable of ES2, changed its direction. Annoying little cable. - Photo: http://bkite.com/03mrm"
  • Marika tweeted, "This is really good. - Photo: http://bkite.com/03mcQ"
  • Marika tweeted, "No, I am NOT influenced by Matthew Carter's Verdana >.<"
  • Marika tweeted, "must say that multi-layering on iPhone is a LOT fun. Imaging having users to press Back button for 10 times LMAO"
  • Marika tweeted, "The differences between men and women, illustrated prototype. http://tinyurl.com/2o4fuj"

last.fm