[TYPO3-dev] Current pid not yet available while FE authentication?

Richard Davies richard at ocular.co.nz
Sun Nov 25 10:09:06 CET 2012


Hi again,

Because (as far as I know) the PID can only be known by decoding the url at
this point, you could look up the root pid in sys_domain, then search for
the start of the URL along with the rootpage_pid from the sys_domain table,
then get the corresponding pagepath. Might be worth looking into how
realurl gets it since it would be quite complicated if you encode extension
vals like tt_news etc.

Another option which is a hack is to have a library function in your
extension that detects the user needs authing, sets some GET value or
session value to the current PID/typoscript values you need, then set the
header location to refresh the page so the auth code can access that
information. Horrible but if you don't want to do it the way above thats
another way to do it.

Richard


On 24 November 2012 03:20, Steffen Müller <typo3 at t3node.com> wrote:

> Hi Richard,
>
> On 22.11.2012 21:42 Richard Davies wrote:
> >
> > I've thought this through and there are a couple of 'hack' ways to do
> this:
> > 1. Use the array $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['realurl'] in
> > conjunction with database lookups to decode the URL yourself (or use a
> part
> > of RealUrl if it allows it
> > 2. If all you need is the site rootline pid, you can use the table
> > sys_domain. Get the domain name from global vars, then select pid from
> > sys_domain where domainName = $domainName
> >
>
> Thanks for your support.
>
> Your suggestion is a step forward.  But using the rootpage id would not
> deliver the specific TS settings from the current page below the rootpage.
>
> Do you have some more hints?
>
> --
> cheers,
> Steffen
>
> TYPO3 Blog: http://www.t3node.com/
> Twitter: @t3node - http://twitter.com/t3node
> _______________________________________________
> TYPO3-dev mailing list
> TYPO3-dev at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-dev
>



More information about the TYPO3-dev mailing list