× 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

How to enable the new URL aliases in 3.8?

More
5 years 7 months ago #4829 by sdd
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 to join the conversation.

More
5 years 7 months ago #4830 by Dirk
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 to join the conversation.

More
5 years 7 months ago #4831 by sdd
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 to join the conversation.

Moderators: Dirkjoest