typescript 使用TypoScript创建垂直时间轴(https://codyhouse.co/demo/vertical-timeline/index.html)
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了typescript 使用TypoScript创建垂直时间轴(https://codyhouse.co/demo/vertical-timeline/index.html)相关的知识,希望对你有一定的参考价值。
[PIDinRootline = 6]
# implement a vertical timeline via TypoScript
# JS Demo: https://codyhouse.co/demo/vertical-timeline/index.html
# add JavaScript and Styles
page{
includeJS {
# {$screen.javascript} is just a constant for the javascript path
verticalSliderJs = {$screen.javascript}/vertical-timeline/js/main.js
}
includeCSS {
# {$screen.javascript} is just a constant for the javascript path
verticalSliderStyle = {$screen.javascript}/vertical-timeline/style/style.css
}
}
# select the folder with pages
# - folder
# |
# |- page 1
# | |
# | |- page content
# | |- page content
# |
# |- page 2
# | |- page content
#
lib.highlights = COA
lib.highlights {
10 = CONTENT
10 {
table = pages
select.pidInList = 15
renderObj = COA
renderObj {
# register pageUid and pageTitle, the page's uid and title, for later reference via register:pageUid and register:pageTitle
10 = LOAD_REGISTER
10 {
pageUid.cObject = TEXT
pageUid.cObject {
field = uid
}
pageTitle.cObject = TEXT
pageTitle.cObject {
field = title
}
}
30 = COA
30 {
10 = CONTENT
10 {
# select page content from according page (see renderObj as a loop)
table = tt_content
select.pidInList.data = register:pageUid
renderObj = COA
renderObj {
# the image
10 = TEXT
10.value = <div class="cd-timeline-img cd-picture bounce-in"><img src="{$screen.javascript}/vertical-timeline/img/cd-icon-picture.svg" alt=""></div>
# content with header and bodytext, wrapped in a div
30 = TEXT
30.value = <div class="cd-timeline-content bounce-in">
40 = COA
40 {
# use header, standard rendering
20 = COA
20 < lib.stdheader
# parse bodytext, standard rendering
30 = TEXT
30.field = bodytext
30.parseFunc < lib.parseFunc_RTE
# wrap the folder's title
40 = TEXT
40.data = register:pageTitle
40.wrap = <div class="cd-date">|</div>
}
50 = TEXT
50.value = </div>
# wrap a block around every element
wrap = <div class="cd-timeline-block">|</div>
}
}
20 = RESTORE_REGISTER
}
}
stdWrap {
wrap = <section id="cd-timeline" class="cd-container">|</section>
}
}
}
[end]
以上是关于typescript 使用TypoScript创建垂直时间轴(https://codyhouse.co/demo/vertical-timeline/index.html)的主要内容,如果未能解决你的问题,请参考以下文章
typescript TypoScript如果使用“AND”
typescript Typo3:本年度的Typoscript版权
使用typoscript创建链接(使用typolink)
Typoscript 的 TYPO3 问题和访问 $this->settings
TYPO3/TypoScript - 在 DataProcessor 中使用 FIELD() 自定义排序
html 错字3:在流体模板中使用typoScript条件