[TYPO3-extbase-kickstarter] Best practice to set storagePid in "tutorial mode"?

Rens Admiraal rens.admiraal at typo3.org
Mon Jul 25 09:30:14 CEST 2011


Hmmz... Good question...

I personally don't like the need for the static template, it could be someone
only has persistence settings, and in this case he has to include
the static template, just for the storage pid for example... I would say
we have to add a default configuration to the ext_typoscript.txt file.

So, I would pick 3b (yes b, because I don't like current pid :p ). We
could easily pick add the first subpage of pid 0 with 'is_siteroot = 1'.
This would be the right page to get the configuration from in almost
all single site installations.

Bastian: I remember something from the code of the ConfigurationManager...
Isn't it true Extbase already tries to find the page to get the config from?
Because this is not only an Extension Builder issue I think... If Extbase
doesn't already 'guess' the page, please let me know if this would be
needed for extbase, we could discuss an approach and I can supply a patch...


Greetz,
Rens

On 2011-07-25, Nicolas de Haen <typo3 at ndh-websolutions.de> wrote:
> Hi,
>
> since the extension builder is just a very small step from being 
> released into TER I would like to discuss this issue:
>
> I want to introduce a "tutorial mode" (the opposite of the existing 
> "advanced mode") to make it easier for extbase newbies to get started.
>
> One issue that is almost always forgotten is to configure the storage pid.
>
> I see 3 possibilities to help here:
>
> 1. Display a message in frontend:
> "Please include the static template and set the storage pid in the 
> constant editor" (Current solution)
>
> 2. Display a message in frontend:
> "Please select the recordStorage page in the plugins "Behaviour" tab"
>
> 3. provide a working configuration "out-of-the-box" for the tutorial 
> mode by writing:
>
> plugin.tx_extkey.persistence.storagePid.cObject = TEXT
> plugin.tx_extkey.persistence.storagePid.cObject.field = pid
>
> into ext_typoscript_setup.txt
>
> This would result in a storagePid pointing always to the current page 
> (where the plugin is placed)
> That would make it easier to have a working plugin "out-of-the-box", but 
> it is of course not always best practice to configure a plugin like that 
> (especially if you have different pages for creating and listing records).
>
>
> It's a general strategic question; Should the focus be more on a quick 
> sense of achievement for new users or should it be on best practice...
>
> regards,
> Nico
>


-- 

--
Rens Admiraal
Core Developer V5 Team

TYPO3 .... inspiring people to share!
Get involved: typo3.org


More information about the TYPO3-project-extbase-kickstarter mailing list