[TYPO3-dev] non-standard page types and extension configuration info?
Jason Lefkowitz
jason at jasonlefkowitz.net
Mon Jun 4 22:58:07 CEST 2007
Hey everybody...
I'm in the process of writing my 1st TYPO3 extension, and I've run into
a weird thing involving non-standard page types.
One thing I want my extension to do is create output that isn't HTML --
the way tt_news does with XML feeds. I figured out that I could use an
alternate page type to accomplish this. From the extensions Typoscript
setup:
xmlPage = PAGE
xmlPage.pageNum = 9999
xmlPage.config.disableAllHeaderCode = 1
xmlPage.config.additionalHeaders = Content-type: application/xml
xmlPage.10 < plugin.tx_myextension_pi1
This works fine -- the page comes back as XML, with the right MIME type
and everything, when I hit it using the pageNum (i.e.
index.php?id=1&type=9999).
The problem is when I try to get the data set in the plugin's Flexform.
An example would be the startingpoint set by the user. When I hit
the page without the special pageNum (i.e. index.php?id=1), I can get
the startingpoint this way:
$startingPoint = $this -> cObj -> data['pages'];
However, when I hit it WITH the pageNum (index.php?id=1&type=9999),
$startingPoint is empty.
The same thing happens with the Flexform I set up to allow configuration
of the plugin output. None of the settings come through in
$this->cObj->data['pi_flexform'] when using the pageNum, even though I
have "$this->pi_initPIflexForm();" in my script.
Is there some special thing I have to do to get access to plugin
configuration data like the starting point when using non-standard page
types?
Thanks!
-- Jason Lefkowitz
More information about the TYPO3-dev
mailing list