html - Typo3 hide fluidcontent_core header when value is set to None -
i'm trying override typo3 fluidcontent_core partial "content/header", in order avoid creating tag when header item set "none". using information this post able add "none" option dropdown. however, still have following 2 problems:
- when try override partialroottemplate point extension, no changes make content/header partial (located in own extension) have effect. code:
plugin.tx_fluidcontentcore.view.partialrootpaths.0 = ext:manageengine_fluid/resources/private/fluidcontent/partials/
. path exists, , literally copied , pasted contents of partials folder fluidcontent_core. editing header element editing fluidcontent_core partial file directly works. however, haven't been able have not display when header.type set none. attempt (which 1 line, i'm not sure how else place v:tag v:if):
{v:if(then: <v:tag name="h{content.settings.header.type -> v:or(alternative: record.header_layout) -> v:or(alternative: settings.header.type)}" class="{content.settings.header.classname}" hideifempty="{content.settings.header.hideifempty -> v:or(alternative: 1)}">{record.header -> f:format.raw()}</v:tag>, else: , stack: {content.settings.header.type != 'none'}}
currently, setting header level none, results in
<hnone>
tag.
any advice appreciated. if there's better way go this, i'm open suggestions!
i've solved half of problem. in order have header not appear @ all, i've made following adjustments:
plugin.tx_fluidcontentcore { settings { header { types = h1,h2,h3,h4,h5,h6, } } }
this way, following edit content/header partial hides tag when 7th (empty) header level chosen.
{namespace v=fluidtypo3\vhs\viewhelpers} <v:tag name="{content.settings.header.type -> v:or(alternative: record.header_layout) -> v:or(alternative: settings.header.type)}" class="{content.settings.header.classname}" hideifempty="{content.settings.header.hideifempty -> v:or(alternative: 1)}"> <f:if condition="{content.settings.header.type}"> {record.header -> f:format.raw()} </f:if> </v:tag>
the important changes above removal of "h" in name (so name can empty, resulting in no html tag), , f:if
statement around record.header
, no text printed when tags don't appear.
i still haven't been able override partial content/header different extension. if manage it, update answer.
Comments
Post a Comment