mercredi 1 juillet 2015

Typo3 hide fluidcontent_core header when value is set to None

I'm trying to override the Typo3 fluidcontent_core partial "Content/Header", in order to avoid creating the tag when the header item is set to "None". Using the information from this post I was able to add "None" as an option to the dropdown. However, I still have the following 2 problems:

  1. When I try to override the partialRootTemplate to point to my extension, no changes I make to the Content/Header partial (located in my own extension) have any effect. My code: plugin.tx_fluidcontentcore.view.partialRootPaths.0 = EXT:manageengine_fluid/Resources/Private/FluidContent/Partials/. The path exists, and I literally copied and pasted the contents of the Partials folder from fluidcontent_core.
  2. Editing the header element by editing the fluidcontent_core partial file directly works. However, I haven't been able to have it not display anything when the header.type is set to None. My attempt (which is actually all one line, as I'm not sure how else to place a v:tag into a 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 the Header Level to None, results in an <hnone> tag.

Any advice would be much appreciated. If there's a better way to go about this, I'm completely open to suggestions!

Aucun commentaire:

Enregistrer un commentaire