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.080 seconds

I jumped and started to work on a demo component... but 2 days later this demo component became the real component. I just showed today the end result to my customer and he turned to me and said... "this is more than I expected"... All of this is because Cook did cut about 70% of my work and provided me more ways to improve the usability of the component. The end result was 17 tables all related between than to generate a full dashboard for the travel agents. Thanks for Cook developers for such great tool. This component would not be possible to be done at short time with all the features in it
Griiettner (Forum)  

Get Started