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

Although I found this tool some time ago I just started learning experimenting and building this first component on Monday and now on Thursday afternoon it's already online. Although I already had a working version done with another tool this is much easier to build and at the end you have the freedom to own your own component. Once you know how to use Cook you will boost your productivity as the learning curve is really moderate compared to many other tools.
Giori (Forum)

Get Started