Welcome, Guest
Username: Password: Remember me
If you expect answers you should describe your problem and give as much information's as possible. (SQL-Structure, Template Code, Joomla Version ...) Please read this before posting: joodb.feenders.de/support.html
  • Page:
  • 1

TOPIC: How to enable the new URL aliases in 3.8?

How to enable the new URL aliases in 3.8? 9 months 2 weeks ago #4829

  • sdd
  • sdd's Avatar Topic Author
  • Offline
  • Posts: 5
  • Thank you received: 0
Hi!

Thank you so much for listening and implementing URL aliases like I asked for here:
joodb.feenders.de/forum/4-questions/3115...-without-the-id.html

I have updated to 3.8 to enable this and selected our product names in the new "Alias name for URL (optional)" field in my database's General Options, but selecting something here doesn't seem to be enough to make it work. I was hoping the automatically generated URLs in the catalog view (for instance) would be without the IDs, now that I provided an alias name.

What else needs to be done? I can't find anything on the subject in your documentation.

- I'm on Joomla 3.8.11 and JooDB 3.8 Pro.
- Both my title field and alias name field is Name (as in product name, like "EXAMPLE-30-12X").

Thanks!

Best regards,
Sæbjørn

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

How to enable the new URL aliases in 3.8? 9 months 2 weeks ago #4830

  • Dirk
  • Dirk's Avatar
  • Offline
  • Posts: 1025
  • Karma: 21
  • Thank you received: 184
Take phpmyadmin and look at the alias column.

The alias (segment) is always the URL cleaned unique title.
"The first day" will be "the-first-day"!

Its mostly for SEO reasons.

So instead of
mysite.com/XXXX-the-first-day.html
the URL will be
mysite.com/the-first-day.html

Joodb creates the alias only on save and only if the alias field is empty!

If you are good in SQL you could create a alias field and
copy the cleaned title field into it.
Something like this
UPDATE table SET alias = LOWER(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(TRIM(title), ':', ''), '’', ''), ')', ''), '(', ''), ',', ''), '\\', ''), '\/', ''), '\"', ''), '?', ''), '\'', ''), '&', ''), '!', ''), '.', ''), ' ', '-'), '--', '-'), '--', '-'));

Remember alias must be unique!
The following user(s) said Thank You: sdd

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

How to enable the new URL aliases in 3.8? 9 months 2 weeks ago #4831

  • sdd
  • sdd's Avatar Topic Author
  • Offline
  • Posts: 5
  • Thank you received: 0
Thank you. I have now made the alias field by making a lowercase copy of the name field in phpmyadmin. All values are unique, containing only letters, numbers and dashes (-). The aliases in themselves work just fine now.

But the URLs generated and used by the catalog view are still the ones with the IDs in it. I'm guessing this isn't something I can change my self, but is just the way JooDB works at the moment?

In my mind, all automatic URL generation should be based on what is provided in the alias field (if anything and properly formatted). This is a big part of why the alias feature was needed in the first place. Don't you agree?

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

  • Page:
  • 1
Moderators: Dirkjoest