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

URL parameters

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

Can someone point me to a resource that explains how the URL parameters like /tag:foobar work? I probably just missed it, but I am wondering what parameters are supported or how they are chosen to modify the page content.

Is it just used for taxonomy or for other things too?

And how'd I set up a URL using the Feed plugin that creates a feed for the chosen tag (".../blog.atom/tag:travel"). Currently the feed is set up doing this:

TWIG
{% set feed_url = blog.url == '/' or blog.url == base_url_relative ? (base_url_relative~'/'~blog.slug) : blog.url %}
9 years ago

They can be used by anything, by Plugins or even in your Twig you can do {{ grav.uri.param('some-parameter') }} to get a param value.

In your case, you can build the URL like (localhost example) http://localhost:8089/blog/tag:coda/.rss by getting the tag parameter value.

Suggested topics

Topic Participants Replies Views Activity
Archive · by Deleted User, 9 years ago
0 1336 9 years ago
Archive · by Muut Archive, 9 years ago
2 925 9 years ago
Archive · by Muut Archive, 9 years ago
2 4056 9 years ago
Archive · by Muut Archive, 9 years ago
1 2941 9 years ago
Archive · by Muut Archive, 9 years ago
3 1112 9 years ago