Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC:

Router with slug 13 Mar 2017 14:58 #15037

  • admin
  • admin's Avatar Topic Author
  • Offline
  • Administrator
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 986
This monday, we propose you to automatically re-use the item aliases for building nice URLs.

The router has been rewritten, and it is fully customizable, even for using the filters.
You gonna love it !

www.j-cook.pro/index.php/docs/versions/291-3-1-3-router-slug
Coding is now a piece of cake
The following user(s) said Thank You: Romkabouter

Please Log in or Create an account to join the conversation.

Router with slug 18 May 2017 09:19 #15140

  • liubov
  • liubov's Avatar
  • Offline
  • Elite Member
  • Elite Member
  • (=) 10 mn and it's ready!
  • Posts: 279
  • Thank you received: 36
Do you think it's possible to use the router to rewrite the URL (using SEF).

Actual URL : component/jbreeding/portee/porteeactuelle.html?cid=366
Would like : component/jbreeding/portee/366-porteeactuelle.html ( as content )

I do not have Alias in the table 'Portees', how can I proceed ? an idea ?

Please Log in or Create an account to join the conversation.

Last edit: by liubov.

Router with slug 19 May 2017 12:32 #15145

  • admin
  • admin's Avatar Topic Author
  • Offline
  • Administrator
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 986
Router is designed for SEO, so yes you can do that.

Then, it is customizable in
FRONT/router.php
Function : XxxxRouteConfig()

(Available since 3.1.3)

I see, you do do have even title is this table, so you might hit a foreign table.
Router is using ORM, so in the 'aliasKey', just define the namespace you want.
Here an example :
'city' => array(
    array(
        'type' => 'layout'
    ),
    array(
        'type' => 'slug',
        'aliasKey' => 'country.alias' // HERE the namespace for the slug
    )
),

I didn't tested, but it should work. Tell me, and share your result...
Note that this will take the FIRST result only, so it might work only for 1:1. In case only the first result will be used.
Coding is now a piece of cake

Please Log in or Create an account to join the conversation.

Router with slug 19 May 2017 16:59 #15146

  • liubov
  • liubov's Avatar
  • Offline
  • Elite Member
  • Elite Member
  • (=) 10 mn and it's ready!
  • Posts: 279
  • Thank you received: 36
In some other Breeding Application, I saw sometime an Alias Name to describe a litter (une portée en fr).
Breeder gives a Specific and Unic name to the litter. ie: "Orchidée17", "Magnolia12", etc ...
Now, with this SEO problem, I anderstand why !

I played a lot with the router, but do not have a lot of solution.
So not really sexy for the moment:

component/jbreeding/portee/porteeactuelle/365.html
or Through the menu
elevage/portees-actuelles/portee/porteeactuelle/365.html

Please Log in or Create an account to join the conversation.

Last edit: by liubov.
  • Page:
  • 1
Time to create page: 0.091 seconds
  I still don't believe he can really be human to do all this ! From all of the forums that I've ever participated in this is certainly the one that most encapsulates the feeling of being truly open source where everyone's opinions and contributions can and will shape the development of the service! It's truly awesome! Hope you enjoy cooking and look forward to reading and contributing to any of the editorial work that you proposed too!! Thanks
Gez (audibleid - JED)

Get Started