[FLOW3-general] Sub folder in Controller
Jeff Segars
jsegars at alumni.rice.edu
Mon Jul 16 20:22:47 CEST 2012
Hey Martin,
Now I see why were not quite connecting :)
I'm suggesting that setting up a subpackage is the way to achieve the
organization you're after rather than nesting a new folder inside
Controller.
Thanks,
Jeff
On 7/16/12 11:42 AM, Martin wrote:
> Hey Jeff,
>
> thanks for your help.
>
> Administration is not my subpackage key, I tried to extend the folder
> 'Controller' as I have seen it in the Conference Pakage.
>
> So you have the
> <MainPackageKey>/Classes/Controller/<newFolder>/AdministrationController.php
>
> Is that possible?
>
> Of course I adapted the namespace
>
> Cheers
>
> Martin
>
> On 07/16/2012 05:37 PM, Jeff Segars wrote:
>> Martin,
>> The key thing is that your subpackage key needs to come *before* the
>> Controller section of the path. In the example below, I'm assuming
>> Administration is your subpackage key.
>>
>> <Package>/Classes/Administration/Controller/AdministrationController.php
>>
>> <f:link.action action="index" subpackage="Administration"
>> controller="Administration"> ...
>>
>> You'll of course need to update your controller namespaces to include
>> the subpackage in the namespace. If there's no custom routing, that
>> should be the only change needed.
>>
>> Thanks,
>> Jeff
>>
>>
>> On 7/16/12 10:04 AM, Martin wrote:
>>> Hey Jeff,
>>>
>>> thanks for ur reply.
>>>
>>> I don't get it running, I get this Error instead: #1301650951: No
>>> controller object was found for package "abgabe", subpackage "",
>>> controller "administration" in route "FLOW3 :: default with action and
>>> format", as I did before.
>>>
>>> My Folder structure looks like this
>>> <Package>/Classes/Controller/Administration/AdministrationController.php
>>>
>>> As long as I am not familiar with routing I didn't change any.
>>>
>>> Can I access this AdministrationController.php directly?
>>> Or what has to be change that this setup will work, I tried to get a
>>> clue from TYPO3 or the Conference package but didn't get anything
>>> working.
>>>
>>> How do I setup the <f:link.action...
>>>
>>> Cheers
>>>
>>> Martin
>>>
>>> On 07/16/2012 04:38 PM, Jeff Segars wrote:
>>>> Hey Martin,
>>>>
>>>> Try Administration/Controllers/AdministrationController instead. This
>>>> will make Administration act as a subpackage and you can group View
>>>> Helpers, Domain Models, and Repositories within that subpackage if you'd
>>>> like.
>>>>
>>>> In your view, you can now use <f:link.action action="index"
>>>> subpackage="Administration" controller="Administration"> ...
>>>>
>>>> Hope that helps!
>>>> Jeff
>>>>
>>>>
>>>> On 7/16/12 8:14 AM, Martin wrote:
>>>>> Dear List,
>>>>>
>>>>> how can i access a subfolder in Controllers?
>>>>>
>>>>> I want to organize my controllers a little bit, but we don't become
>>>>> friends.
>>>>>
>>>>> What do I have to do, to get for examlple
>>>>> Controllers/Administration/AdministrationController running.
>>>>>
>>>>> In the View I tried: <f:link.action action="index"
>>>>> controller="Administration[/,\]Administration"
>>>>>> Administration</f:link.action>
>>>>>
>>>>> And calling it directly is also not working.
>>>>> I also tried to put up a subroute but I am not familiar with routes
>>>>> ether.
>>>>>
>>>>> Cheers Martin
>>>>
>>>>
>>
>>
>
More information about the FLOW3-general
mailing list