TYPO3 Gridelement nesting not working - typo3

I've created a extension based on bootstrap_grids, but cannot nest the grid elements. I understand that "allowed = *" should do the job, but the ce don't show up in nested elements.
tx_gridelements {
setup {
section {
title = LLL:EXT:h_grid/Resources/Private/Language/locallang_db.xlf:section.title
description = LLL:EXT:h_grid/Resources/Private/Language/locallang_db.xlf:section.description
icon = EXT:h_grid/Resources/Public/Icons/gridlayout_section.gif
frame = 3
topLevelLayout = 0
config {
colCount = 1
rowCount = 1
rows.1 {
columns {
1 {
name = LLL:EXT:h_grid/Resources/Private/Language/locallang_db.xlf:celayout.leftColumn
colPos = 101
allowed = *
allowedGridTypes = *
}
}
}
}
}
....
Did I miss something?

Try leaving out the lines
allowed = *
allowedGridTypes = *
when you're not actually excluding any elements.

Related

Content isn't visible on the website but it's added in ACP

I'm new to TYPO3. I came across a small problem - I've added content blocks in ACP (=admin control panel) but they're not visible live.
web_layout.tsconfig:
yellow {
config {
backend_layout {
colCount = 2
rowCount = 3
rows {
1 {
columns {
1 {
colPos = 0
name = LLL:EXT:site/Resources/Private/Language/locallang.xlf:backendLayout.yellow.colPos.0
}
2 {
colPos = 1
name = LLL:EXT:site/Resources/Private/Language/locallang.xlf:backendLayout.yellow.colPos.1
}
}
}
2 {
columns {
3 {
colPos = 2
name = LLL:EXT:site/Resources/Private/Language/locallang.xlf:backendLayout.yellow.colPos.2
}
4 {
colPos = 3
name = LLL:EXT:site/Resources/Private/Language/locallang.xlf:backendLayout.yellow.colPos.3
}
}
}
3 {
columns {
5 {
colPos = 4
name = LLL:EXT:site/Resources/Private/Language/locallang.xlf:backendLayout.yellow.colPos.4
}
6 {
colPos = 5
name = LLL:EXT:site/Resources/Private/Language/locallang.xlf:backendLayout.yellow.colPos.5
}
}
}
}
}
}
title = LLL:EXT:site/Resources/Private/Language/locallang.xlf:backendLayout.yellow
}
I need to make them visible. As you can see in my web_layout.tsconfig I have 2 columns and 3 rows but on the website there is visible only first row and first column - without the rest of them.
Where should I change config to allow/show TYPO3 that I want to display all 2 columns and 3 rows?
If you create a backend layout you have not changed the rendering for the frontend.
For the frontent you need to adapt the rendering. best way would be to change it depending on selected backend layout.
Therefore you need to copy the given FLUID templates (Layouts/ Templates/ Partials) into your own extension, modify them and add them to the paths.
More information can be found in the manual

TYPO3 8.7.8 restrict available content-elements in backend-layout column

I've been searching over and over but yet haven't found something that would work...
TYPO3 8.7.8
root - backend-layout ("Main") for this and all subpages (id=1)
|
- home - backend-layout ("Home") for this page only (id=2)
|
- subpage - same backend-layout as root (id=3)
both backend-layouts look the same:
________________________________
| Top |
|______________________________|
| main-content | right-content |
|______________|_______________|
The top-section is named differently and to be used differently.
The top-section of the "Main"-backend-layout should have only allowed the images-content-element.
cType.allowed = image
The top-section of the "Home"-backend-layout should have only allowed the text-content-element
cType.allowed = text
The last two things I've tried is
first: restricting it using the GlobalVars in typoscript
[globalVar = TSFE:id != 2]&&[globalVar = TSFE:colPos=2]
TCEFORM.tt_content.CType.removeItems := addToList(header,text,bullets,table,uploads,multimedia,mailform,search,login,splash,menu,shortcut,list,script,div,html,media)
TCEFORM.tt_content.CType.keepItems := addToList(image)
[end]
second: changing the properties of the layout in the database
backend_layout {
colCount = 2
rowCount = 2
rows {
1 {
columns {
1 {
name = Parallax
colspan = 2
colPos = 2
# The following 3 lines have been added through me
cType {
allowed = text
}
}
}
}
2 {
columns {
1 {
name = Content-Main
colPos = 0
}
2 {
name = Content-Right
colPos = 1
}
}
}
}
}
I've tried quite a few other things and I'm not sure if I would find them again. I'm not even sure this can be done in TYPO3 8.x. The options from creating a backend-layout in typo are really restricted. You can only type a name for the column and define the colPos.
Did I do something wrong for TYPO3 8.x that my configurations didn't work?
Do I need different properties? Or is it just not intended to work this way anymore in this version of TYPO3? Because it seems that it has worked before...
I'm still quite a novice to TYPO3 and I would really appreciate your help but be specific on where to change what because otherwise I'll be lost again.... ^^
Thanks!
Thanks to Joey I found the extension to work with: Content Defender
And I found out how to add my backend_layouts through ts; Add the following to the PageTS of the root page
mod.web_layout.BackendLayouts {
Home {
title = Home
config {
backend_layout {
colCount = 2
rowCount = 2
rows {
1 {
columns {
1 {
name = Parallax
colspan = 2
colPos = 2
# allowed and disallowed only work through the extension content_defender (or gridelements)
allowed {
CType = gi_customstyler_parallax_content
}
}
}
}
2 {
columns {
1 {
name = Main
colPos = 0
disallowed {
CType = gi_customstyler_bg_image,gi_customstyler_parallax_content
}
}
2 {
name = Right
colPos = 1
disallowed {
CType = gi_customstyler_bg_image,gi_customstyler_parallax_content
}
}
}
}
}
}
}
}
Main {
title = Main
config {
backend_layout {
colCount = 2
rowCount = 2
rows {
1 {
columns {
1 {
name = Titel-Hintergrund
colspan = 2
colPos = 2
allowed {
CType = gi_customstyler_bg_image
}
}
}
}
2 {
columns {
1 {
name = Main
colPos = 0
disallowed {
CType = gi_customstyler_bg_image,gi_customstyler_parallax_content
}
}
2 {
name = Right
colPos = 1
disallowed {
CType = gi_customstyler_bg_image,gi_customstyler_parallax_content
}
}
}
}
}
}
}
}
}
This way the two backend_layouts are available on the page-configurations with the additional conditions of restricted content-elements. As you can see, this can also be used with custom content-elements.
It took quite a while for me to figure this out (as novice) and I hope that this might help someone else...
Try something like this :
backend_layout {
colCount = 2
rowCount = 2
rows {
1 {
columns {
1 {
name = Parallax
colspan = 2
colPos = 2
allowed = text
}
}
}
2 {
columns {
1 {
name = Content-Main
colPos = 0
}
2 {
name = Content-Right
colPos = 1
}
}
}
}
}
You are on the good way, but the condition is not correct.
Prolbem one: There is no TSFE available for the BE.
In the "globalString" condition, key "TSFE:" will not work because the
TSFE global object only exists in the FE context. The "LIT:" key will
not work either as it is used to compare TypoScript constants, which
are not available in the BE context.
Reference: https://docs.typo3.org/typo3cms/TSconfigReference/Conditions/Index.html
You need to use the "page" instead of the "TSFE:page|". These are equal, but "page" can be used for both frontend and backend but "TSFE" is only for frontend.
The second problem is, that for the colPos you need to access the GP (GetPost) helper instead of the TSFE.
So try to change the condition like this:
[page|uid != 2]&&[globalVar = GP:colPos==2]
TCEFORM.tt_content.CType.removeItems := addToList(header,text,bullets,table,uploads,multimedia,mailform,search,login,splash,menu,shortcut,list,script,div,html,media)
TCEFORM.tt_content.CType.keepItems := addToList(image)
[end]
Note: there is no CType restriction for the BE layouts, so both "cType" and "allowed" are wrong.

TYPO3 and sitemap_generator

I use TYPO3 7.6.10 and sitemap_generator 1.0
I see the sitemap.xml and it generates the map but there are not the categories and tags like "categoy/nameofcategory".
How can I solve it?
The code in template is:
plugin.tx_sitemapgenerator {
urlEntries {
pages = 1
pages {
rootPageId = 1
allowedDoktypes = 1
additionalWhere = doktype!=6
}
}
}
plugin.tx_sitemapgenerator {
urlEntries {
news = 1
news {
active = 1
table = tx_news_domain_model_news
additionalWhere = pid!=0
orderBy = title DESC
limit = 0,1000
lastmod = tstamp
url = TEXT
url {
typolink.parameter = 161
typolink.additionalParams = &tx_news_pi1[controller]=News&tx_news_pi1[action]=detail&tx_news_pi1[news]={field:uid}
typolink.additionalParams.insertData = 1
typolink.useCacheHash = 1
typolink.returnLast = url
typolink.forceAbsoluteUrl = 1
}
}
}
}
A sitemap for google doesn't contain such stuff as tags and description, so there is no need for the extension to deliver that stuff. Check the specs of creating a sitemap here. Google build a sitemap

typo3 formhandler error tx_formhandler_log

I tried to implement a new form which creates a tt_addressrecord. But everytime when I submit the form it shows an error that the table tx_formhandler_log does not exist. But I use the standart ts. Here my ts for my form:
plugin.Tx_Formhandler.settings.predef.newsletter {
disableWrapInBaseClass = 1
# Common configuration
debug = 1
name = Newsletter
addErrorAnchors = 1
1.templateFile = TEXT
1.templateFile.value = typo3conf/templates/main/plugins/formhandler/newsletter.form.html
langFile.1 = typo3conf/templates/main/plugins/formhandler/locallang.xml
formValuesPrefix = notifiers
disableWrapInBaseClass = 1
isErrorMarker.default = error
isErrorMarker {
global = error
}
errorListTemplate {
totalWrap >
singleWrap = <p> | </p>
}
finishers {
1.class = Tx_Finisher_DB
1.config {
table = tt_address
key = uid
fields {
email.mapping = email
email.ifIsEmpty = 1
pid.ifIsEmpty = 109
hidden.ifIsEmpty = 1
module_sys_dmail_html.ifIsEmpty = 1
}
}
2.class = Tx_Formhandler_Finisher_Mail
2.config {
checkBinaryCrLf = message
admin {
templateFile = TEXT
templateFile.value = typo3conf/templates/main/plugins/formhandler/newsletter.email.admin.html
sender_email = email
to_email = {newsletter.mail.address.admin}
replyto_email = email
replyto_name = email
subject = TEXT
subject.value = {newsletter.subject.admin}
}
}
3.class = Finisher_Redirect
3.config {
redirectPage = 1
additionalParams {
success = 1
}
}
}
}
A Database Compare could be helpful for your issue:
Go to the Install Tool -> Important Actions and click on Database Compare. This compares your current database to the configuration files and you can automatically fix missing tables or fields.
In older TYPO3 versions (< 6.2) you'll find this in menu item Database Analyser in the Install Tool.

typoscript issue with LOAD_REGISTER and if condition to fill a list

What I'm trying to do is quite complex and an Extbase extension is involved...
Step by step, what I'm trying to do:
An Extbase plugin decides, if certain navigation elements should be marked.
This plugin has one action for each navigation element.
The returned value (0 or 1) from each action in TS is stored on the stack (LOAD_REGISTER).
A list of page UIDs is build by checking against the stored values (0,1).
The navigation COA is modified using this list of page UIDs.
Here is the typoscript code I'm using:
// load information, if pages lack info, into register
10 = LOAD_REGISTER
10 {
lacksAnfahrt {
cObject = USER_INT
cObject {
userFunc = tx_extbase_core_bootstrap->run
pluginName = Pa_klinik_data_edit
extensionName = Hplusinfo
controller = SpitalInfoPA
switchableControllerActions {
SpitalInfoPA {
1 = completeAnfahrt
}
}
}
}
lacksAktivitaeten < .lacksAnfahrt
lacksAktivitaeten.cObject.switchableControllerActions.SpitalInfoPA.1 = completeAktivitaeten
lacksBildergalerie < .lacksAnfahrt
lacksBildergalerie.cObject.switchableControllerActions.SpitalInfoPA.1 = completeBildergalerie
// build a list of PIDs that are going to be marked in navigation
lackPIDs.cObject = COA
lackPIDs.cObject {
10 = TEXT
10 {
value = {$config.PIDLists.anfahrt},
if {
value = 1
equals.data = register:lacksAnfahrt
}
}
20 < .10
20.value = {$config.PIDLists.bildergalerie},
20.if.equals.data = register:lacksBildergalerie
30 < .10
30.value = {$config.PIDLists.aktivitaeten},
30.if.equals.data = register:lacksAktivitaeten
// don't let the comma separated list end with a comma
99 = TEXT
99.value = 0
} // lackPIDs
} // REGISTER
// mark incomplete pages with a red exclamation mark
20 { // = HMENU
1 { // = TMENU
NO { // = 1
stdWrap.wrap = |<span class="warning lacksInfo">!</span>
stdWrap.wrap.if {
value.data = register:lackPIDs
isInList.field = uid
}
}
}
}
If i print out register:lacksBildergalerie and all the others, their values are correct (0 or 1).
But the lackPIDslist always empty (except of the 0 at the end)... There must be something wrong with the middle part:
10 {
value = {$nav.PIDLists.anfahrt},
if {
value = 1
equals.data = register:lacksAnfahrt
}
}
This evaluation seams to return false in any case.
I also tried with different if function like:
10 {
value = {$nav.PIDLists.anfahrt},
if {
isTrue.data = register:lacksAnfahrt
}
}
But this doesn't solve the problem.
Just overlooked that the other registers are using USER_INT as well