[TYPO3-mvc] shared partials - or let us be able to set a "extensionkey" for f:render

Franz Koch typo3.RemoveForMessage at elements-net.de
Thu Nov 4 11:45:19 CET 2010


Hey,

>>> So my proposal would be to add a new parameter "extensionKey" (or alike)
>>> to the "render" viewHelper that allows to define from which extension
>>> configuration the partial/template shall be resolved. Might also be
>>> useful for widgets (so they may come some day).
>>>
>>> What do you think?
>>
>> Why don't you just define the same PartialStorage Path for all
>> Extensions? Like put all partials in Fileadmin...

that'll of course work, and that's what I was forced to do for now, but 
that's no real solution for the issue. This concept is fine if you like 
to change foreign partials, but it prevents the usage of untouched 
foreign partials in your own templates. Let's say your domain model has 
a relation to a news item and you like to use the "teaser" partial of 
the news extension. You would have to copy it to your directory and 
loose track of changes probably done in newer versions of the news 
extension. You could also redirect all partials to a common folder, but 
then again you loose track of changes done by the foreign extension even 
if you don't like to modify them. The second downside is that it could 
happen that two extensions use the same name for a partial and you're 
screwed again.

> Well, I guess it should work, but then how do you manage to keep them
> synchronized with a version control system if they are all together
> sitting in a common directory? Will be a bit complicated...

that's also one of my problems with the current concept.

-- 
kind regards,
Franz Koch


More information about the TYPO3-project-typo3v4mvc mailing list