I looked for a way to make children pages ineherit parent plugin
I found this that works to the inheritance but in place of get the plugin on the main content zone of the pages, it took all the page.
How could I change the typoscript config to take only the content div and not the whole page.
The actual configuration
page = PAGE
page.10 = USER
page.10 {
userFunc = TYPO3\CMS\Extbase\Core\Bootstrap->run
vendorName = LUSIS
extensionName = JurisprudenceLegislation
pluginName = JurisprudenceLegislation
switchableControllerActions {
Frontend {
0 = routing
}
}
}
The typoscript of the template
config.baseURL = {$siteURL}
config.tx_realurl_enable = 1
page {
meta.keywords.data = register:newsKeywords // field : keywords
meta.description.data = register:newsSubheader // field : description
}
##############################################################
# This is TypoScript used to modify the core templates to
# display this skin. Rewrite the header, footer, pre code and
# post code libraries and more when needed to change structure
##############################################################
preCodeHeader = TEXT
preCodeHeader.value = <div id="pageWrap">
postCodeHeader >
preCodeFeature >
postCodeFeature >
preCodeContent = TEXT
preCodeContent.value (
<div id="content">
)
preCodeGeneratedContent-1 >
postCodeGeneratedContent-1 >
preCodeContentBlock-1 = TEXT
preCodeContentBlock-1.value = <a href="#beginContent" id="beginContent" class="outOfSight" name="beginContent"></a>
postCodeContentBlock-1 >
preCodeContentBlock-2 >
postCodeContentBlock-2 >
preCodeContentBlock-3 >
postCodeContentBlock-3 >
preCodeGeneratedContent-2 >
postCodeGeneratedContent-2 >
preCodeFooter = TEXT
preCodeFooter.value (
</div>
<!-- end #content -->
)
postCodeFooter = TEXT
postCodeFooter.value (
</div>
<!-- end #pageWrap -->
)
### Lets table classes be added in the RTE
lib.parseFunc_RTE.externalBlocks.table.stdWrap.HTMLparser.tags.table.fixAttrib.class.list >
lib.parseFunc_RTE.nonTypoTagStdWrap.encapsLines.addAttributes.P.class >
### Menu de support niveau 1
### Normalement tout est customisable via CSS
globalMenu >
globalMenu = HMENU
globalMenu.special = directory
globalMenu.special.value = {$globalMenuPageId}
globalMenu.wrap = <ul id="globalMenu">|</ul><div class="clearOnly"> </div><!-- end #globalMenu -->
globalMenu.1 = TMENU
globalMenu.1 {
noBlur = 1
NO.subst_elementUid = 1
NO.before = <li id="globalMenuItem-{elementUid}">|*|<li id="globalMenuItem-{elementUid}">|*|<li id="globalMenuItem-{elementUid}" class="last">
NO.after = </li>
NO.stdWrap.htmlSpecialChars = 1
ACT = 1
ACT.subst_elementUid = 1
ACT.before = <li id="globalMenuItem-{elementUid}" class="active">|*|<li id="globalMenuItem-{elementUid}" class="active">|*|<li id="globalMenuItem-{elementUid}" class="active last">
ACT.after = </li>
ACT.stdWrap.htmlSpecialChars = 1
}
#### Fils d'Ariane
breadcrumb >
breadcrumb=COA
breadcrumb {
10 = HMENU
10 {
special = rootline
special.range = 0|-1
# "not in menu pages" should show up in the breadcrumbs menu
includeNotInMenu = 0
1 = TMENU
# no unneccessary scripting.
1.noBlur = 1
# Current item should be unlinked
1.CUR = 1
1.target = _self
1.wrap = <div class="breadcrumb"> | </div>
1.NO {
stdWrap.field = title
ATagTitle.field = nav_title // title
linkWrap = ||*| <span class="separator"> ></span> |*|
}
# Current menu item is unlinked
1.CUR {
stdWrap.field = title
linkWrap = ||*| <span class="separator"> ></span> <span class="current">|</span>|
doNotLinkIt = 1
}
}
}
### Sous-rubriques
subFolder >
subFolder = HMENU
subFolder.special = directory
subFolder.stdWrap.required=1
subFolder.stdWrap.dataWrap = <div class="clearOnly"> </div><div id="subFolderBox"><div class="subFolderTitle"><span>Sous-Rubriques</span></div><div class="subFolderContent"><div class="contentTop"><ul id="subFolder">|</ul></div><div class="contentBottom"><div class="contentLeft"></div><div class="contentRight"></div></div></div></div><!-- end #subFolderBox -->
[globalVar = GP:L = 1]
subFolder.stdWrap.dataWrap = <div class="clearOnly"> </div><div id="subFolderBox"><div class="subFolderTitle"><span>Sub-Folders</span></div><div class="subFolderContent"><div class="contentTop"><ul id="subFolder">|</ul></div><div class="contentBottom"><div class="contentLeft"></div><div class="contentRight"></div></div></div></div><!-- end #subFolderBox -->
[GLOBAL]
subFolder.1 = TMENU
subFolder.1 {
noBlur = 1
NO.subst_elementUid = 1
NO.before = <li>|*|<li>|*|<li class="last">
NO.after = </li>
NO.stdWrap.htmlSpecialChars = 1
}
## Menu de langue
langMenu >
langMenu = HMENU
langMenu.wrap= <div id="langMenu">|</div>
langMenu.special = language
langMenu.special.value = 0,1,2,5
langMenu.1 = GMENU
langMenu.1.NO {
XY = [5.w]+6, [5.h]+5
backColor = white
transparentColor=white
5 = IMAGE
5.file = fileadmin/flags/flag_fr.gif || fileadmin/flags/flag_uk.gif || fileadmin/flags/flag_de.gif || fileadmin/flags/hl_pt.gif
5.offset = 3,3
}
langMenu.1.ACT < langMenu.1.NO
langMenu.1.ACT=1
langMenu.1.ACT.backColor = #1B4B7A
langMenu.1.USERDEF1 < langMenu.1.NO
langMenu.1.USERDEF1=1
langMenu.1.USERDEF1.5.file = fileadmin/flags/flag_fr_d.gif || fileadmin/flags/flag_uk_d.gif || fileadmin/flags/flag_de_d.gif || fileadmin/flags/flag_pt_d.gif
langMenu.1.USERDEF1.noLink = 1
langMenu.1.USERDEF2 < langMenu.1.NO
langMenu.1.USERDEF2=1
langMenu.1.USERDEF2.5.file = fileadmin/flags/flag_fr_d.gif || fileadmin/flags/flag_uk_d.gif || fileadmin/flags/flag_de_d.gif || fileadmin/flags/flag_pt_d.gif
langMenu.1.USERDEF2.noLink = 1
langMenu.1.USERDEF2.backColor = #1B4B7A
## Configuration de langue
##Paramètres de langues
# Langue par defaut
config.sys_language_uid = 0
config.language = fr
config.locale_all = fr_FR
config.htmlTag_langKey = fr
config.linkVars = L
config.sys_language_mode = content_fallback
config.sys_language_overlay = 1
// Liste des langues via le language switcher
[globalVar = GP:L = 1]
config.sys_language_uid = 1
config.language = en
config.locale_all = en_US
config.htmlTag_langKey = en
[GLOBAL]
[globalVar = GP:L = 2]
config.sys_language_uid = 2
config.language = de
config.locale_all = de_DE
config.htmlTag_langKey = de
[GLOBAL]
[globalVar = GP:L = 5]
config.sys_language_uid = 5
config.language = pt
config.locale_all = pt_PT
config.htmlTag_langKey = pt
[GLOBAL]
## Menu de support niveau 2
topMenu >
topMenu = HMENU
topMenu.special = directory
topMenu.special.value = {$topMenuPageId}
topMenu.wrap = <ul id="topMenu">|</ul><!-- end #topMenu -->
topMenu.1 = TMENU
topMenu.1 {
noBlur = 1
NO.subst_elementUid = 1
NO.before = <li id="topMenuItem-{elementUid}">|*|<li id="topMenuItem-{elementUid}">|*|<li id="topMenuItem-{elementUid}" class="last">
NO.after = </li>
NO.stdWrap.htmlSpecialChars = 1
ACT = 1
ACT.subst_elementUid = 1
ACT.before = <li id="topMenuItem-{elementUid}" class="active">|*|<li id="topMenuItem-{elementUid}" class="active">|*|<li id="topMenuItem-{elementUid}" class="active last">
ACT.after = </li>
ACT.stdWrap.htmlSpecialChars = 1
}
# --- Recherche ----------------------------------
## Configuration générale
config.index_enable = 1
config.index_externals = 1
config.redirectOldLinksToNew = 0
## Box de recherche
plugin.tx_macinasearchbox_pi1 {
pidSearchpage = {$searchPageId}
templateFile = {$templavoila_framework.skinPath}ext-templates/indexed-search/template.htm
}
## Configuration page de recherche/recherche avancée
plugin.tx_indexedsearch {
templateFile={$templavoila_framework.skinPath}ext-templates/indexed-search/indexed-search.tmpl
search.exactCount = 0
blind {
type=0
defOp=0
sections=0
media=0
order=0
group=0
extResume = 0
lang=0
desc=0
results=0
type {
10 = 1 // on cache le type Phonétique
}
sections {
-1 = 1
-2 = 1
-3 = 1
}
}
show {
rules=0
advancedSearchLink = 1
resultNumber = 1
rootPidList = -1
parsetimes=1
L2sections=1
L1sections=1
LxALLtypes=0
}
}
// Exemple de traduction de libellé de la recherche avancée
// plugin.tx_indexedsearch._LOCAL_LANG.fr.rules_header = Règles
plugin.tx_indexedsearch._LOCAL_LANG.fr.form_from = Période de recherche :
plugin.tx_indexedsearch._LOCAL_LANG.fr.form_to = A :
plugin.tx_indexedsearch._LOCAL_LANG.en.form_from = From :
plugin.tx_indexedsearch._LOCAL_LANG.en.form_to = To :
## Header global : Reprend les éléments précédents
header >
header = COA
header.wrap = <div id="header"> | </div>
header.10 = COA
header.10.wrap = <div id="hdr"><div id="logo-site"><a href="{$siteURL}" title="home"><img src="{$siteLogo}" alt="logo"/></a></div> | </div>
header.10.20.wrap = <div id="support-menu"> | <div id="cornersupport"></div><div class="clearOnly"> </div></div>
header.10.20 = COA
header.10.20.10 < {$langMenu}
header.10.20.20 < topMenu
# --- SEARCHBOX OBJECT ----------------------------------
lib.searchbox = COA_INT
lib.searchbox {
stdWrap.prefixComment = 2 | lib.searchbox
10 = TEXT
10.typolink.parameter = {$searchPageId}
10.typolink.returnLast = url
10.wrap = <div class="tx-macinasearchbox-pi1"><form action="|" method="post" id="indexedsearch">Recherche :
20 = COA
20 {
10 = TEXT
10.data = GPvar : tx_indexedsearch |sword
10.htmlSpecialChars = 1
10.wrap = <input name="tx_indexedsearch[sword]" value="|" class="searchBoxInput" type="text" />
20 = COA
20 {
10 = TEXT
10.value = <input type="hidden" name="tx_indexedsearch[sections]" value="0" /><input type="hidden" name="tx_indexedsearch[pointer]" value="0" /><input type="hidden" name="tx_indexedsearch[ext]" value="0" />
15 = TEXT
15.value = <input type="hidden" name="tx_indexedsearch[lang]" value="0" />
20 = TEXT
20.value = <input name="tx_indexedsearch[submit_button]" type="submit" class="searchBoxSubmit" value="OK" />
}
}
30 = COA
30 {
10 = TEXT
10.value = Recherche avancée
10.typolink.parameter = {$searchPageId}
10.typolink.additionalParams = &tx_indexedsearch[ext]=1
10.wrap = <span id="advancedsearch" class="button_mid_ico">|</span>
## if.isTrue = {$plugin.tx_indexedsearch.showAdvanced}
}
wrap = | </form></div>
}
[globalVar = GP:L = 1]
lib.searchbox.10.wrap = <div class="tx-macinasearchbox-pi1"><form action="|" method="post" id="indexedsearch">Search :
lib.searchbox.30.10.value = Advanced Search
lib.searchbox.20.20.15.value = <input type="hidden" name="tx_indexedsearch[lang]" value="1" />
[global]
// CORRECTION
header.20 = COA
header.20.wrap = <div id="search"><div class="contentLeft"></div><div class="contentRight"></div> | </div>
#header.20.10 < plugin.tx_macinasearchbox_pi1
header.20.10 < lib.searchbox
// FIN CORRECTION
header.30 = COA
header.30.wrap = <div id="main-menu"><div class="contentLeft"></div><div class="contentRight"></div> | </div>
header.30.10 < globalMenu
## Header spécifique àla Newsletter
headerNewsletter >
headerNewsletter = COA
headerNewsletter.wrap = <div id="hdrNewsletter"> | </div>
## Fotter
footer >
footer = TEXT
footer {
data = date:U
strftime = %Y
dataWrap = <div class="clearOnly"> </div><div id="footer" class="clear"><p id="footerCopyright">© | {$copyright}</p><div class="clearOnly"> </div></div><!-- end #footer -->
}
## Javascript si le site contient la librairie JQuery
[globalVar = LIT:1 = {$enableJQuery}]
## Javascript + CSS
page {
includeCSS {
tf_skin_z1 = {$templavoila_framework.skinPath}css/custom-theme/jquery-ui.min.css
tf_skin_z3 = {$templavoila_framework.skinPath}css/treeview/jquery.treeview.css
tf_skin_z4 = {$templavoila_framework.skinPath}css/print.css
tf_skin_z5 = {$templavoila_framework.skinPath}css/powermail/powermail-custom.css
tf_skin_z4.title = Print CSS
tf_skin_z4.media = print
}
includeJS {
tf_skin_z1 = {$templavoila_framework.skinPath}js/jquery-ui.min.js
tf_skin_z2 = {$templavoila_framework.skinPath}js/jquery.treeview.min.js
tf_skin_z3 = {$templavoila_framework.skinPath}js/jquery.cookie.js
}
}
[global]
Sorry but I'm almost beginner in typoscript syntax
You should define a (HTML-)templating for your pages.
I would prefer FLUID as state of the art.
Then you would define your content in some fluid variables and your inherited content could be one of these.
page.10 = FLUIDTEMPLATE
page.10 {
templateName = Default
layoutRootPaths {
10 = EXT:my_site_ext/Resources/Private/Layouts
}
partialRootPaths {
10 = EXT:my_site_ext/Resources/Private/Partials
}
templateRootPaths {
10 = EXT:my_site_ext/Resources/Private/Templates
}
variables {
content < styles.content.get
contentLeft < styles.content.get
contentLeft.select.where = colPos = 1
contentRight = USER
contentRight {
userFunc = TYPO3\CMS\Extbase\Core\Bootstrap->run
vendorName = LUSIS
extensionName = JurisprudenceLegislation
pluginName = JurisprudenceLegislation
switchableControllerActions {
Frontend {
0 = routing
}
}
}
footer < lib.footer
:
}
}
Try to use lib.anything
or even better temp.anything
for all content you predefine and copy afterwards into the fluid variables.
And so you can use lib.anything
from fluid prefer variables which are set in the beginning of the fluid working.