Search
Other Articles Anywhere questions
Forum

Question about the url to the article

Simon Delmotte's Avatar Simon Delmotte
Hello,

I'm working on updating a site to Joomla! 4.
It was initially made with Joomla! 3.

In this site there is a blog which presents the members of the company.
The grid presentation of the list of members has been made with an override of the category view.
The name of the category is Members (alias: members)

For each member there is a Readmore link that leads to the Joomla! article about the member.
The url of this Readmore link is like: …/members/id-alias

For the new Joomla! 4 I would like to use Articles Anywhere to display the list of members.
The problem is that the Readmore url to the article is no longer the same.
It is built like this: …/members?view=article&id=xx:alias&catid=xx
I would like to keep the original url.

Completely by chance while doing tests I found that:
- if I keep a menu link to the Members category (type Article/Category Blog),
- and if the article used for laying out the list with Articles Anywhere have the same name than the category (so the same alias: 'members')
I keep the original url as I wish.

It is really great but I wonder if everything is OK because there is no menu link to the article that contains the Articles Anywhere tags. I still use a menu link to the category.

What do you think?

Thank you
Peter van Westen's Avatar Peter van Westen ADMIN
I am not sure I follow.

Articles Anywhere simply asks Joomla to generate the URL for it (via the JRoute) based on the article id and category.

If you want to custom create a URL, you can of course, use the different data tags (for article id and alias and category id and alias) inside the href attribute of your link
Please post a rating at the Joomla! Extensions Directory
Simon Delmotte's Avatar Simon Delmotte
Hello Peter,

Thank you for your reply.

Sorry for my somewhat confusing post.
It reflects my difficulty in mastering the Joomla router!

To create lists of articles you must put them in a category.
A URL for each article is then automatically created.

I tried to build the Readmore url with Articles Anywhere tags ([id]-[alias]) but often got a 404 error.
It looks like I need to test again but I'm not sure if it's possible to override the core Joomla! Category View by an article containing the Articles Anywhere tags.

Best regards
Peter van Westen's Avatar Peter van Westen ADMIN
It is outside the control of Articles Anywhere how the routing of URLs work.
And yes, it matters whether you have a menu item pointing towards a parent category (blog or list) page or not.

I recommend you use the [link] or [url] data tags so you know the URLs will work.
And you could optionally choose to create (hidden) menu items to category pages to influence the format of the url.
Or use an extension like sh404sef to create your own custom urls.
Please post a rating at the Joomla! Extensions Directory
Simon Delmotte's Avatar Simon Delmotte
Thank you for your advices
You can only post on the extension support forum if you have an active subscription and you log in

Buy a Pro subscription