A mountpoint is a page which - for the next level - points to another page. See this image:
Here a menu for the page “Sub-subpage (MOUNT...)” (the one with the mousecursor over) will display the subpages found in the sysFolder “Mounted pages 2”. When clicking any of these pages the pages displayed will look to the frontend as if they were really subpages to the “Sub-subpage (MOUNT...” instead of “Mounted pages 2”. The ways this is done is by sending an additional parameter with the id to the index.php script. This parameter tells the system that when the “Mounted pages 2” pages is found in the rootLine it should be substituted with the “Sub-subpage (MOUNT...” page and continue the decent in the rootline from there.
When making this kind of feature there are two things to consider.
- Reading from the root of the page tree and outwards: No problem, when we discover a mountpoint, we could simply read on from the other page! However we must check that we do not end up in an eternal look if a mountpoint points to itself.
- Reading from the branch and inwards: Problem: We will by default get the rootline where the page is really mounted. But in many cases we would need the rootline of the mount instead! Therefore we must add a variable so the frontend KNOWS that this page id is supposed to be found in another rootline.
The solution is the get-var called &MP. If you have a page (id=1) which is a mountpoint to another page (id=2), then if you want to see the page with id 2 (or any other page inside of this) as mounted from the rootline of page with id 1, then you must call the page with &id=2&MP=2-1.
The problem is that most of the default linking mechanisms in Typo3 does not recognize the MP variable. Only does HMENU links. They are programmed to do that because it is thought that the typical use of mount points is with menus where you want to share some pages between sites in a system while using various templates.
So:
- only HMENU currently offers support for linking which observes mountpoints
- if you retrieve a list of id-numbers from a certain page and outwards in the tree, you will NOT get the ids of the mounted branch but rather the real id's of any subpages. (This is because support for this is not yet implemented if ever. Further implementation requires a check for recursiveness which makes it little more complex.)