Use Article/Category Alias in REST URL?
-
trav_stone
-
Topic Author
-
Offline
-
New Member
-
Less
More
-
Posts: 2
-
Thank you received: 0
-
-
8 years 10 months ago #4979
by trav_stone
Is it possible to use the category/article alias in the REST URL (like the SEF URLs)?
For example, say I have an article visible on the front-end site as:
example.com/category-alias/article-alias
Is there some way to get this via REST as:
example.com/jBackend/get/content/category-alias/article-alias
instead of this:
example.com/jBackend/get/content/articles/<integer id>
If this requires a code change, could you point me in the direction of the relevant code? Or alternatively, is there a way to achieve this by crafting a special menu/module/plugin?
Many thanks!
Trav
Please Log in or Create an account to join the conversation.
Less
More
-
Posts: 3194
-
Thank you received: 441
-
-
8 years 10 months ago #4980
by admin
Hi Trav,
unfortunately this is not possible with the current article plugin structure.
The piece "articles" after the "get/content" is needed to understand what you are asking for (i.e. articles). With your URL structure this could be the category alias, but how could I ask, as example, for a list of categories?
Anyway, you could change the plugin according to your needs without to change the "core" part. For this each plugin supports a "onBeforeCheckModule" event, which allows to manipulate the variables. in this function you could change the "routing" as you want. More info here:
www.selfget.com/documentation/jbackend-joomla30/developers-guide.html
Kind regards,
Luigi
Please Log in or Create an account to join the conversation.
-
trav_stone
-
Topic Author
-
Offline
-
New Member
-
Less
More
-
Posts: 2
-
Thank you received: 0
-
-
8 years 10 months ago #4983
by trav_stone
Hey Luigi,
Thanks for the info and the link; I kind of figured that would be the case. Will have a look at that documentation and see what I can come up with.
Trav
Please Log in or Create an account to join the conversation.
Less
More
-
Posts: 3194
-
Thank you received: 441
-
-
Time to create page: 0.141 seconds