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

Awards for the best Joomla app. This product is gonna win an award for this amazing job. Cook Self Service is the the best application from all over the Joomla universe ! It brings Joomla to a professional level really advanced for developers. It is a real fun to develop with it. The ACL part and security checks implementation are just... so much hours saved. I can now concentrate myself more on the design part and the creative works. Thank you so much. Guys I offer you all my congratulation ! Keep up the works because Joomla is needing it to increase the quality of extensions availables on the JED. I also learned a lot because I can see how to code at the proper place and I found all my answers reading the forum.
lack_hanson (JED)
          

Get Started