Skip to content
Grav 2.0 is officially stable. Read the announcement →
Archive

Plugin Example — TwigExtension Dynamic URL

Started by Muut Archive 9 years ago · 1 replies · 530 views
9 years ago

Could somebody please supply a link to an example which does the following?

I want to create a plugin which is capable to intercept a specific given url path to query a remote REST API.

www.example.com/custom/<.>/<.>

<- if that url is opened, there shall be no page exist in Grav but only a call to my plugin which reads all url parameters, calls an external REST api, obtains the data and fills a Twig template with the result-values inclusive all meta-header data on that page.

I have dynamic values in a database which are completely split apart the Grav installation
and some urls in my Grav installation are supposed to be 100% dynamic based on external services.

Thank you very much.

9 years ago

the part with query a rest service is no problem ( solved already with guzzle ) I need information about URL interception and calling a template inside the plugin so that i can fill it with the queried values.

Suggested topics

Topic Participants Replies Views Activity
Archive · by Deleted User, 9 years ago
0 1349 9 years ago
Archive · by Muut Archive, 9 years ago
2 934 9 years ago
Archive · by Muut Archive, 9 years ago
2 4060 9 years ago
Archive · by Muut Archive, 9 years ago
1 2946 9 years ago
Archive · by Muut Archive, 9 years ago
3 1118 9 years ago