Typo3 Breadcrumb with stdWrap.data possible? - typo3

I am new to Typo3 and wanted to have something like this: date / page1 > page2 > page3...
I know how to make a simple breadcrumb but now I wonder how I can put the current date in front of it. When I try the stdWrap.data + stdWrap.dataWrap the breadcrumb doesn't show.
20 = HMENU
20 {
special = rootline
special.range = 0 | -1
stdWrap.data = date : d.m.Y :::
stdWrap.dataWrap = <p> | </p>
//wrap = <p> | </p>
1 = TMENU
1 {
NO = 1
NO.allWrap = | >
CUR = 1
CUR.allWrap = |
}
}
Currently I don't know if I had to write to objects in typoscript for it or if I could do it in once like I tried. Maybe you can hint me to something or explain a simple way. Thanks!

You need to do a proper wrapping.
20.stdWrap.data
is no wrap at all and will be ignored so you might only get an empty p-tag from the stdWrap.dataWrap.
Following your attempt I think you want something like:
20.dataWrap = <p>{date:d.m.Y}</p> |
so I don't get it why you use a p tag to get all in one line.

I would propose a different TypoScript:
lib.breadcrumb = COA
lib.breadcrumb {
stdWrap.wrap = <ul>|</ul>
10 = TEXT
10 {
wrap = <li>|</li>
data = date : U
strftime = %A, %e. %B %Y
}
20 = HMENU
20 ... your TS for the breadcrumb menu
}

Related

TYPO3: typoscript wrap two elements with div

is it possible to wrap always two <li> elements in a div in typoscript?
at the moment it looks like this:
navStatic = HMENU
navStatic {
special = directory
special.value = 2
excludeUidList = 2
1 = TMENU
1 {
expAll = 1
wrap = <ul class="headernavmenu">|</ul>
noBlur = 1
NO = 1
NO {
ATagTitle.field = title
wrapItemAndSub = <li>|</li>
allWrap = | I |*| | I |*| |
}
ACT < .NO
ACT.ATagParams = class="active_static"
}
}
thanks in advance
This addition to your TypoScript should do the job, just when an odd number of li-elements is in the list the last single li-element is not wrapped.
NO.wrapItemAndSub.outerWrap = <div class="two-list-elements"> || || </div>
Be advised that this HTML-solution is error-prone as browsers might interpret it different or not at all because the HTML is not standard-conform.

Typo3: Output of all 2nd level pages as menu independent of active pages

I want to create a menu of all 2nd level items at once in separate DIVs (outside the first level menu) - independent of the active page. Do you have an hint for me? Thank you very much for your help!!
don't forget to configure
1.expAll = 1
in your typoscript menu definition
I think you are looking something like this:
lib.menu = COA
lib.menu {
# Menu of first Level
10 = HMENU
10.entryLevel = 0
10.1 = TMENU
10.1.wrap = <ul> | </ul>
10.1.NO.allWrap = <li>|</li>
# Menu of all second levels
20 = HMENU
20.entryLevel = 0
20.1 = TMENU
20.1.expAll = 1
20.1.NO.doNotLinkIt = 1
20.1.NO.doNotShowLink =1
20.1.IFSUB = 1
20.1.IFSUB.doNotLinkIt = 1
20.1.IFSUB.allWrap = <h4>2°lv (|) </h4>
20.2 = TMENU
20.2.wrap = <ul> | </ul>
20.2.NO.allWrap = <li> | </li>
}
Thank you for your answers! I found a similar solution like the one Cristian Buja posted, that works fine for me. Here's the code if someone have the same issue: `lib.subnav = HMENU
lib.subnav {
1 = TMENU
1 {
expAll = 1
NO.doNotShowLink = 1
IFSUB = 1
IFSUB.doNotShowLink = 1
IFSUB.allWrap = <div id="s{elementUid}" class="nv-sub-wrapper"><div class="nv-sub-menu clearfix">|
IFSUB.wrapItemAndSub = |<div class="nv-sub-info"></div></div></div>
IFSUB.subst_elementUid = 1
}
2 = TMENU
2 {
wrap = <ul>|</ul>
NO = 0
NO {
ATagParams = data-description="{field:abstract // field:subtitle // field:title}"
ATagParams.insertData = 1
wrapItemAndSub = <li>|</li>
}
}
}`

Typoscript Use value in Text Wrap multiple times

In a Templavoila FCE i want to achieve the following from an input field:
<a name="Inputvalue">Inputvalue</>
My current Setup is the following:
10 = TEXT
10.current = 1
10.wrap = <a name="|"> | </a>
But for sure, it just fill out the first pipe:
<a name="Inputvalue"></a>
Any Idea how to achieve that in a simple way?
Got it!
I did it this way:
10 = COA
10 {
wrap = |
10 = TEXT
10.current = 1
10.rawUrlEncode = 1
10.wrap = <a name="|">
20 = TEXT
20.current = 1
20.wrap = | </a>
}

TYPO3 excludeUidList is there an includeUidList

Have search the net, for a solution where i have a navi TS file that show a Menu.
here i only want to show 2 links, the links are a Main root page and a sub page, so my question is.
If i dont want to excludeUidList all the 7-9 Uid, is there a way to make a includeUidList ?
bc i can't get this to work, it showing all the Uid links.
lib.leftNavi = HMENU
lib.leftNavi.entryLevel=0
lib.leftNavi.includeUidList = 4,8
lib.leftNavi.1 = TMENU
lib.leftNavi.1 {
wrap = <div id="leftMenu"><ul class="L1"><li><ul>|</ul></li></ul></div>
expAll = 0
NO = 1
NO.allWrap = <li>|</li>
NO.stdWrap.wrap = <span>|</span>
RO < .NO
RO = 1
CUR < .NO
CUR = 1
CUR.allWrap = <li class="current">|</li>
CUR.stdWrap.wrap = <span>|</span>
CUR.ATagParams =
ACT < .CUR
}
No, there is no includeUidList, see the reference at http://docs.typo3.org/typo3cms/TyposcriptReference/latest/ContentObjects/Hmenu/.
But you can use a HMENU with the "special" property: http://docs.typo3.org/typo3cms/TyposcriptReference/latest/ContentObjects/Hmenu/#hmenu-special-property
20 = HMENU
20.special = list
20.special.value = 35, 56
This will generate a menu with page 35 and 36.

TYPO3 - Markup using Math

So lets say I have something like this:
20 = CONTENT
20{
table = tt_content
select{
pidInList = 1
where = colPos = 0
}
renderObj = COA
renderObj{
wrap = <div class="normal">|</div>
10 = TEXT
10{
field = bodytext
}
}
}
and I want that every third object changes the class "normal" by "special". How could I do such operation in Typoscript?
Use optionSplit (DE) for this task on the wrap value, you need abcabc pattern where a,b = normal, c = special, so most probably it will be something like this:
wrap = a||b||c |*| a||b||c
Wrote it from top of my head so you need to check it.