TYPO3: what is the field "access_group" for? - typo3

I don't know what is the field "access_group int(11) DEFAULT 0 NOT NULL" for? First I thought it's for restriction by user_group, but there is an field "fe_group varchar(100) DEFAULT '' NOT NULL" for it. You can find the field also at the documentation Preparing the database , but I couldn't find a description for it, only for "fe_group".

access_group is the be_user group.
In TYPO3 you have an access-system similar to the unix-rights, where you can grnat access to pages (and records in the page).
There is a menu entry System->Access where you select a page and can set values for multiple levels recursive:
You can set Owner and Group and the granted rights which are assigned for
Owner, Group, Everybody
the rights are coded bitwise (other order than displayed):
1 (2^0) Show page: Show/Copy page and content.
2 (2^4) Edit content: Change/Add/Delete/Move content.
3 (2^1) Edit page: Change page eg. change pagetitle etc.
4 (2^2) Delete page: Delete/Move page and content.
5 (2^3) New pages: Create new pages under this page.
These values can be set with TCEMAIN in the page TSconfig, so all pages in a sub tree might get the same rights.
Example:
TCEMAIN.permissions {
userid = 43
groupid = 5
user = 31
group = 19
everybody = 1
}
Each page will get the user with the uid 43 as owner,
the group will be the group with the uid 5,
the owner has every right,
the group can show page, edit page, edit content but can not delete page or create new pages below
every one else can see the page
Alternatively you can set the rights by keywords:
TCEMAIN.permissions {
userid = 43
groupid = 5
user = show, edit, delete, new, editcontent
group = show, edit, editcontent
everybody = show
}
comment from Rudy Gnodde, which I agree:
This is only used for pages, not in custom tables for extensions. It's probably a mistake in this documentation. It should be fe_group I think (which is mentioned in this documentation, but not in the code example which contains access_group).
As TYPO3 manuals can be edited by everyone (there is a button Edit me on GitHub in the upper right corner), I have proposed a correction.

Related

TYPO3 backend user how hide subpages

I have TYPO3 9.5
I want to set db_mountpoints for a backend user group: only 4 pages.
Some of pages have subpages and the users of group can see the subpages.
I don't want that the group to see the subpages.
How can I do that?
You could change the access to pages using the backend module "System" -> "Access".
there you can change the owner and group of pages, and also which rights owner, group, everyone has for these pages.
Make sure new pages have the right group and rights on creation with appropiate default settings in page TSconfig.
TCEMAIN.permissions {
// group for new pages:
groupid = 1
// access rights:
user = 31
group = 19
everybody = 1
}
The rights are bit coded:
1 = show page
2 = edit page
4 = delete page
8 = create pages
16 = edit content

indexed_search Multidomain (TYPO3 9 LTS)

There is a multidomain setup (domains next to each other on the same level), each domain has their own search page and configuration. I've tried...
plugin.tx_indexedsearch.settings.rootPidList = 3
...to get the search results limited to the domains pagetree only. But as soon as using rootPidList, there are no results at all any more. Then i've tried...
plugin.tx_indexedsearch.settings.defaultOptions.sections = rl1_3
...and this seems to work correctly to limit the results to the pagetree (below page id 3).
So what is "rootPidList" ment to be used for?
According to the comment in the code (typo3/sysext/indexed_search/Classes/Controller/SearchController.php, Line 232):
Setting the list of root PIDs for the search. Notice, these page IDs MUST have a TypoScript template with root flag on them!
Basically this list is used to select on the "rl0" field and page ids are registered as "rl0" only if a TypoScript template record with root flag is there.
This happens AFTER the use of $this->searchRootPageIdList above because the above will then fetch the menu for the CURRENT site - regardless of this kind of searching here. Thus a general search will lookup in the WHOLE database while a specific section search will take the current sections.
In a multi domain setup we have set rootPidList to the overall root page (in this case id=457).
defaultOptions.sections is set like this:
defaultOptions.sections=rl{$customer_theme.search.level}_{$customer_theme.root}
{$customer_theme.search.level} is set to 1 or 2 depending on the availability of more than one language per country.
{$customer_theme.root} is the root page (marked by the root page flag).
e.g. for Indonesia (english) we use level = 2 and root = 12947.

TYPO3: Get rootline level with page ID in fluid - maybe in viewhelper

i want to get the rootline level from an page with the ID X.
For example: Page2.1 with the ID 233 -> rootline level = 4.
From this point, i want to get the page id from the parent page in the rootlevel 2.
The reason:
I have a multilanguage webpage with many childpages - like this example:
[root]
|- Umbrella Brand-1
|-country1
|-page1[200] -> relation to page1[400]
|-page2[201]
|-page2.1[203] -> relation to page 2.1[233]
|-page3[202]
|-country2
|-page1[230]
|-page2[231]
|-page2.1[233]
|-page3[232]
|- Umbrella Brand-2
|-country1
|-page1[400]
|-page2[401]
|-page2.1[403]
|-page3[402]
|-country2
|-page1[430]
|-page2[231]
|-page2.1[233]
|-page3[232]
I want to build relation between pages in diffrent countrys, maybe it's a about page. With this relations, i build an country select menu. Here is the background, that by an countrychange the same page open, from where i come. For example: page1[200] -country change->page1[400].
I hope that anyone know what i mean.
Sorry for this bad english.
the TSFE will give you the pagelevel, but I sill dont see how this will work.
If your pages are out of sync, you will loose your link.
Don't understand why you would like to build separate 'sites' for each brand? Only reason would be that they have completely separated content, templates etc.
You could use the languages as country / brand selection. nobody said that the swebsite languages need to be used for languages.
for ex: brand1 / country1 would have lang uid 1
This way you can add all your content on 1 site.
If you need different styling / templates, settings then all can be set by the sys_lang_uid.

TT_NEWS Force Display of Latest News in Single/Latest implementatin (TYPO3)

Sirs,
I have a nice working implementation of SINGLE and Latest on same page. My realurl is working perfectly. Problem is, by default, single doesn't show anything until you click on one of the listed news (displayed by the list plugin). I would like the single plugin to show the latest news on landing.
Any ideas?
FIRST SOLUTION
The solution for the requested behavior is described in the tt_news manual:
Default news id
Insert the following lines to the setup field of an ext-template at
the page where you want to display the latest news item in SINGLE view
if no SINGLE view for another record was requested:
# hide the "no news id" message
plugin.tt_news._LOCAL_LANG.default.noNewsIdMsg =
# set the tt_news singlePid to the current page
plugin.tt_news.singlePid = 977
# fill the content of the main-column to a tmp.object
tmp.pagecontent < page.10.subparts.contentarea
# clear the content of the main column
page.10.subparts.contentarea >
# build a new object for this column as content-object-array
page.10.subparts.contentarea = COA
page.10.subparts.contentarea {
10 = CONTENT
10.table = tt_news
10.select {
# insert the pids of all pages from where you want to fetch news.
# the recursive-field has no influence on this selection
pidInList = 1078,1079,1080,1081,1082,1083,1084
orderBy = datetime desc
max = 1
}
# insert the object “10.” only if there is no SINGLE news selected
# ATTENTION, OUTDATED IN MANUAL, USE GP:... instead of GPvar:... !!!
#10.stdWrap.if.isFalse.data = GPvar:tx_ttnews|tt_news
10.stdWrap.if.isFalse.data = GP:tx_ttnews|tt_news
# re-insert the normal pagecontent to the page
20 < tmp.pagecontent
}
The page in this example contains 2 columns. The news LIST is located
in the left column. the main column (page.10.subparts.contentarea)
contains a SINGLE news content-element.
SECOND SOLUTION – MY FAVORITE
My personal favorite to solve the problem is a bit more slick. It makes use of the noNewsIdMsg (which is simply emptied in the above solution) and uses its stdWrap version to show the latest record exactly when there would normally be a "No news ID" message.
# use the "no news id" message position for the latest news record
plugin.tt_news.singlePid = 977
plugin.tt_news.noNewsIdMsg_stdWrap.cObject = COA
plugin.tt_news.noNewsIdMsg_stdWrap.cObject {
10 = CONTENT
10.table = tt_news
10.select {
# insert the pids of all pages from where you want to fetch news.
# the recursive-field has no influence on this selection
pidInList = 1078,1079,1080,1081,1082,1083,1084
orderBy = datetime desc
max = 1
}
}
Please be aware that in BOTH solutions the template subpart that is used for the inserted default record is NOT ###TEMPLATE_SINGLE### but ###TEMPLATE_SINGLE_RECORDINSERT###.
One solution is to change the text limit for latest view in that particular news plugin as given below:
plugin.tt_news.displayLatest.subheader_stdWrap.crop = 10000 | ... | 1
and also provide a separate template file without
<!--###LINK_ITEM###-->
markers in latest view section.
The Safe Single News extension
adds a new tt_news code: SAFE_SINGLE which ensures that a single news
article is shown even if none is specified. If a news article is
selected, it will simply show it. If none is selected, it will display
the latest news article for the configured category.
Maybe it could help you.
Why not have a "single/latest" view showing a single view (if submitted) and latest if no single view requested. In this plugin set news-limit for latest to "1".
Below add another latest (or list) with news limit set to 3 (or as wanted)

TYPO3: How do I insert page content into template

I have some content that I want to appear on multiple pages of my TYPO3 site. I could just insert this into the template, but I also want that content to be editable in the Rich Text Editor.
So I had the idea of creating a hidden page, but I don't know how to insert this content into a template.
Does it require the select typoscript statement?
Also, as a follow-up question, can I add something to say, only include pages that have this page id as their immediate parent in the page hierarchy.
I didn't quite get the second question.
If you want to include some record only to pages under some other page, then this will obviously work:
[PIDinRootline = pages-uid, pages-uid, ...]
temp.foo = RECORDS
temp.foo {
tables = tt_content
source = ID # Enter the object's ID here
}
[end]
On the other hand, if you want to include all records from pages, being children of some other page, then try something like:
1 = CONTENT
1.table = tt_content
1.select {
pidInList = parent-uid
}
Don't know if I got you right though.
Dmitri.
From Include typo3 content elements on every page:
temp.foo = RECORDS
temp.foo {
tables = tt_content
source = ID # Enter the object's ID here
}
Note the ID is the content record ID, not the page ID.
But that doesn't answer the question of how to only include pages/records with a certain parent.
You can set up a hidden page and then "import" the content elements on a given page via typoscript on the pages (or the entire page tree below) as needed.
The "trick" is to use the colPos with the select-statement. With this you can even put multiple (different) content elements in one (hidden) page that show up on different pages (depending on the setting of the column they are "in".
Example:
Create a hidden (or system) page (here example-pageid = $PID_STATIC)
Create a content element on this page (text)
Edit this content element to be shown on the right column (right equals colPos=2)
Put the following typoscript into the template on which you want the content element to be shown. You can set the pid (pageId) in the constants via PID_STATIC or "hardcode" it into the typoscript.
.
lib.aditionalcontent = COA
lib.aditionalcontent {
10 = CONTENT
10 {
table = tt_content
select.where = colPos = 2
select.orderBy = sorting
select.pidInList = {$PID_STATIC}
}
Add the element lib.aditionalcontent into your template where the content should be shown. For example:
.
page.10 = TEMPLATE
page.10.template = FILE
page.10.template.file = fileadmin/maintemplate.htm
page.10.workOnSubpart = DOCUMENT_BODY
page.10.marks.ADITIONAL_CONTENT < lib.aditionalcontent
.
Watch out, that you set the colPos according to the column that you have set the content element into, otherwise it just will not show.
You can use different columns to do this for different content that has to show up/should not show up on a particular page.
This also works with sytemfolders and non-hidden pages.
If you use TemplaVoila, this should also work although you have to switch to the listview to see and set the colum for the content element (if not hidden for this non-admin user).
To find out which colPos-number is which position of the column go to the phpMyAdmin and search for the field "colPos" in the tt_content table.