[TYPO3] Mountpoints in Pagetrees - Problem [solved]

André Spindler typo3 at andre-spindler.de
Sat Dec 2 13:11:12 CET 2006


Hi folks!

Last night I looked at the problem I posted and found out the reason and a
solution to handle with.

The problem occured when i wanted to open a subtree of the current displayed
tree. I found out, that in this case no form is posted, the +-icon is linked
with a special URL to the script itself. It has only one argument - a code
for the management of the tree.
No pageID is submitted and so the id in class scbase ($this->id) is set to
0. But as the user has no access to the rootlevel, the script does nothing.

I've solved the problem by decoding this code of the pagetree and extracting
the number of the page, the user wants to expand. Then I set the pageID by
myself in the init-funktion of my BE-module.

André


> -----Ursprüngliche Nachricht-----
> Von: typo3-english-bounces at lists.netfielders.de 
> [mailto:typo3-english-bounces at lists.netfielders.de] Im 
> Auftrag von André Spindler
> Gesendet: Freitag, 1. Dezember 2006 17:39
> An: typo3-english at lists.netfielders.de
> Betreff: [TYPO3] Mountpoints in Pagetrees - Problem
> 
> Hello!
> 
> I've got a problem with a pagetree I want to use in a Backend-Module.
> 
> What does:
> - I create a pagetree from class t3lib_browseTree;
> - when I'm logged in as admin user, I see the pagetree, I can 
> expand it, I can select entries
> - it's doing well
> 
> What does not:
> - When I'm logged in as a normal user, my pagetree is not 
> able to expand
> - In the pagetree of the web-module, I can expand and select 
> the complete tree. So it has to do nothing with the access-rights
> - something strange: if i want to expand one parent-tree, the 
> script fails and get no output at all
> - but if I add the subpages of this db_mountingpoint as an 
> separate mountingpoint, I can select then
> 
> So in my conclusion the problem is located in the 
> db_mountpoints. Class "t3lib_browseTree" does only read the 
> first level of the db_mountingpoints, but not recursive, if 
> the logged-in user is not admin.
> Could one of you help me what to do?
> 
> The Part of the script I use to create and display the tree:
> 
> --cut--
> $tree = t3lib_div::makeInstance('t3lib_browseTree');
> $tree->init(' AND pages.doktype IN (1,4,5) AND pages.hidden = 
> "0"'); $tree->thisScript = 'index.php'; 
> $tree->setTreeName('pageTree'); $tree->ext_IconMode = true;
> 								
> $content .= $tree->getBrowsableTree();
> --cut--
> 
> Thankyou,
> André Spindler
> 
> _______________________________________________
> TYPO3-english mailing list
> TYPO3-english at lists.netfielders.de
> http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-english
> 



More information about the TYPO3-english mailing list