× Requests and support related to jBackend.

Use Article/Category Alias in REST URL?

  • trav_stone
  • Topic Author
  • Offline
  • New Member
  • New Member
More
8 years 10 months ago #4979 by trav_stone
Use Article/Category Alias in REST URL? was created 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.

More
8 years 10 months ago #4980 by admin
Replied by admin on topic Use Article/Category Alias in REST URL?
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
  • New Member
More
8 years 10 months ago #4983 by trav_stone
Replied by trav_stone on topic Use Article/Category Alias in REST URL?
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.

More
8 years 10 months ago #4984 by admin
Replied by admin on topic Use Article/Category Alias in REST URL?
U're welcome.

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

Time to create page: 0.141 seconds