martijnboland / apptext

AppText is a content management system for applications. Application developers can use it to replace static resources in applications with dynamic content and delegate content management to non-developers.
https://apptext.io
Apache License 2.0
23 stars 5 forks source link

Possible to link directly to a resource #28

Open vallieresc opened 3 years ago

vallieresc commented 3 years ago

From the public app, is it possible to have an admin click a link that would redirect them directly to the resource item in question via the url similar to your API url? Like a pre-search where I pass in the ID. It would simplify resource management by the editors for large applications.

martijnboland commented 3 years ago

We already have something like this. There is an admin route that accepts the content item ID, /content/{collectionId}/{contentItemKey}, for example https://demo.apptext.io/content/5f87078ff71b9010cd95d8da/There%20are%20n%20notes_plural. Only drawback is that you have to know the collectionId.

Perhaps we should also enable routes like /{appId}/{collectionName}/{contentItemKey} for the admin?

vallieresc commented 3 years ago

@martijnboland Yes that would greatly simplify linking directly to a content item otherwise I'm not sure how easy it would be to find the collection id dynamically. I plan on having a collection for each page of the app since there will be many resource per page and too many would make it confusing to clients (editors).

vallieresc commented 3 years ago

@martijnboland Have you created the proposed api route /{appId}/{collectionName}/{contentItemKey} ?

martijnboland commented 3 years ago

Unfortunately not. I'll try and see if I can add it.

martijnboland commented 3 years ago

A quick heads up on this: I started work on it, but it turned out a bit harder than I thought. Still on the radar though.

vallieresc commented 3 years ago

That's great! I was able to make it work with your API. I inject the collection name and item key in icons beside each labels. It would still be great to have something integrated.