Skip to content
● Meet Grav Guard: keep every Grav site you run secure and up to date, all from one place. Free for up to 3 sites. Read more →

Plugin Example — TwigExtension Dynamic URL

Started by Muut Archive 10 years ago · 1 replies · 697 views
10 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.

10 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 Muut Archive, 10 years ago
1 673 1 week ago
Archive · by Deleted User, 9 years ago
0 3043 9 years ago
Archive · by Muut Archive, 9 years ago
2 1983 9 years ago
Archive · by Muut Archive, 9 years ago
2 5337 9 years ago
Archive · by Muut Archive, 9 years ago
1 4134 9 years ago