[Flow] Routing: Remove vendor.package from URL

David Sporer david.sporer at gmail.com
Sat Jun 21 15:14:14 CEST 2014


Hey guys :-)

In FLOW3 this Route had the effect that the URI-Builder was generating all
Links on a page without the package-Name.

-

  name: 'Default Route without package name'
  uriPattern: '{@controller}/{@action}'
  defaults:
    '@package':    'My.Package'
    '@format':     'html'
    language: 'de'
  appendExceedingArguments: true

Do you have any idea why this is not the case anymore in Flow?
The route itself is working just fine means if I call
domain.com/controller/action I'm seeing the corresponding view but all
links on the page are built in the schema
domain.com/my.package/controller/action

Thanks
David


2014-06-20 20:58 GMT+02:00 David Sporer <david.sporer at gmail.com>:

> Does anyone know if something has changed here?
> This used to work in FLOW3 but now as I'm eventually upgrading to Flow it
> generates all links that are generated including the vendor and package
> name.
>
> Regards
> David
>
>
> 2014-05-24 13:37 GMT+02:00 David Sporer <david.sporer at gmail.com>:
>
> Thank you very much!
>> This one seemed to do the trick:
>>
>> -
>>
>>   name: 'Default Route'
>>   uriPattern: '{@controller}(/{@action})'
>>   defaults:
>>     '@package':    'My.Package'
>>     '@action':     'index'
>>     '@format':     'html'
>>   appendExceedingArguments: true
>>
>>
>> Need to do some more tests if everything's still working but it seems so
>> :-)
>>
>>
>> 2014-05-24 12:59 GMT+02:00 Carsten Bleicker <carsten at bleicker.de>:
>>
>> Maybe do it like the flows default routes.
>>> Use them in your routes and replate {@package} in the uri-pattern by
>>> your packagekey you want, d.e. 'packageKeyWithtoutDot'.
>>> and add after this to defaults
>>>
>>> But maybe there is a better solution.
>>> Never trust me ;)
>>>
>>> Am 24.05.2014 um 12:49 schrieb David Sporer <david.sporer at gmail.com>:
>>>
>>> > Hi Carsten,
>>> >
>>> > thank you! But your example means that I still have to create a Route
>>> for every Action where I want to have nice URLs right?
>>> >
>>> > Haben't tried it yet but will do later.
>>> >
>>> > Regards
>>> > David
>>> >
>>> >
>>> >> Am 24.05.2014 um 10:36 schrieb "Carsten Bleicker" <
>>> carsten at bleicker.de>:
>>> >>
>>> >> Hi David,
>>> >> dont know, is this realy a good practice, but i did it like this:
>>> >> https://gist.github.com/pumatertion/1a12c0b784525c110193
>>> >>
>>> >>
>>> >> ----------------------
>>> >>
>>> >> Carsten Bleicker
>>> >> Wülfingstraße 1
>>> >> 42477 Radevormwald
>>> >>
>>> >> E-Mail:    carsten at bleicker.de
>>> >> Web:    www.bleicker.de
>>> >> Twitter:    @carstenbleicker
>>> >> Jabber:    cbleicker at jabber.ccc.de
>>> >> Telefon:    +49 (0)171-2690845
>>> >>
>>> >>> Am 24.05.2014 um 10:14 schrieb David Sporer <david.sporer at gmail.com
>>> >:
>>> >>>
>>> >>> Hi,
>>> >>>
>>> >>> I'm really sure that this question has already been asked but I
>>> wasn't able
>>> >>> to find the answer.
>>> >>> Is it possible to remove the Package and Vendor name from the URL?
>>> >>>
>>> >>> E.g. domain.com/vendor.package/controller/action
>>> >>> Should always be domain.com/controller/action and default to my
>>> package.
>>> >>>
>>> >>> How can this be done?
>>> >>>
>>> >>> Thanks
>>> >>> David
>>> >>> _______________________________________________
>>> >>> Flow mailing list
>>> >>> Flow at lists.typo3.org
>>> >>> http://lists.typo3.org/cgi-bin/mailman/listinfo/flow
>>> >>
>>> >> _______________________________________________
>>> >> Flow mailing list
>>> >> Flow at lists.typo3.org
>>> >> http://lists.typo3.org/cgi-bin/mailman/listinfo/flow
>>> > _______________________________________________
>>> > Flow mailing list
>>> > Flow at lists.typo3.org
>>> > http://lists.typo3.org/cgi-bin/mailman/listinfo/flow
>>>
>>>
>>> _______________________________________________
>>> Flow mailing list
>>> Flow at lists.typo3.org
>>> http://lists.typo3.org/cgi-bin/mailman/listinfo/flow
>>>
>>
>>
>


More information about the Flow mailing list