Muut Archive Legend
@Muut · Joined 9 years ago · 18337 posts · 3878 topics · 137 reputation
Badges
Recent posts
-
Collection with root.descendants + filter on content type?
· 10 years ago
Hmm, I don't see the point of defining the 'recentnews' collection. The 'events' will already grab all the page that has for taxonomy 'events' You can do your filter with just {% set blogpost =
-
Collection with root.descendants + filter on content type?
· 10 years ago
Using dump(), I could see that taxonomy.type does not always exist. So should I filter on template ? Is it possible ?
-
Collection with root.descendants + filter on content type?
· 10 years ago
Hi, I have some content types which are potentially everywhere in the site. I would like to gather them on my home page. First I did: {% set recentnews = page.collection({
-
Get URI segment data
· 10 years ago
And got it... {% if grav.uri.paths.0 %} do something {% endif %}
-
Get URI segment data
· 10 years ago
Ok so I go this working: {% if grav.uri.paths.0 == "test" %} do something {% endif %} But this doesn't work - any ideas? {% if grav.uri.paths.count() > 0 %} this has a child {% endif %}
-
Get URI segment data
· 10 years ago
Hi, yeah ok so that gives me this: array:2 [ 0 => "test" 1 => "test-child" ] If i'm at /test/test-child... but how can I use that in a twig variable? E.g: {% if segment_0 == "test" %} foo
-
Get URI segment data
· 10 years ago
Hi, in Twig you can reference grav.uri.paths and that will return an array of the segments found in the URL So you can check for example {{dump("folder" in grav.uri.paths)}}
-
Get URI segment data
· 10 years ago
Is it possible to get URI segment data from Grav? E.g. if I have a page on a site like this: www.mysite.com/folder/page/item/ I want to get segment data for that page - so segment 1 == folder, segment
-
Seems than there is an error running grav with caddy server
· 10 years ago
I change my fastcgi in the Caddyfile to fastcgi_pass 127.0.0.1:9000; after that then I run php-cgi -b 127.0.0.1:9000 and it works ok, now the caddyserver runs pretty good with the rewrites modified
-
Seems than there is an error running grav with caddy server
· 10 years ago
Need to check the best solution and submit a fix.