Questions tagged [grav]

Grav is a open-source, flat-file, PHP-based CMS.

Key Technologies

  • Twig Templating: for powerful control of the user interface
  • Markdown: for easy content creation
  • YAML: for simple configuration
  • Parsedown: for fast Markdown and Markdown Extra support
  • Doctrine Cache: for performance
  • Pimple Dependency Injection Container: for extensibility and maintainability
  • Symfony Event Dispatcher: for plugin event handling
  • Symfony Console: for CLI interface
  • Gregwar Image Library: for dynamic image manipulation

It's focus is on quick set-up and extensions via plug-ins and themes.

More Information

207 questions
0
votes
1 answer

Grav - sort collection by date when date is in format 'd-m-Y' (30-11-2014 13:00)

I am using collections to sort list of blog entries: --- title: Noticias content: items: '@self.children' order: by: header.date dir: asc pagination: true limit: 10 --- All my page dates have the following…
M.E.
  • 4,955
  • 4
  • 49
  • 128
0
votes
1 answer

YAML list of text/url pairs to be used in Grav/Twig

I would like to represent the following JSON structure in YAML. [ {'text': 'Text1', 'url': 'Url1'}, {'text': 'Text2', 'url': 'Url2'}, {'text': 'Text3', 'url': 'Url3'}, ] I have tried without success: - text: Text1 url: Url1 - …
M.E.
  • 4,955
  • 4
  • 49
  • 128
0
votes
2 answers

Grav/Twig - Implement text headlines as part of a modular page

I would like to implement a News Headline banner. The HTML code for that headline banner is this:
0
votes
1 answer

Twig & Yaml with Grav

I am currently creating a module on Grav but I have a problem. Yaml : table: - title: Test content: - value: 'test1' - value: 'test2' - value:…
Kol2gaR
  • 202
  • 2
  • 13
0
votes
1 answer

Grav CMS home_url with anchor

So, I want to add some anchor to my url. My code Link name and it's not working. It gives me something like this Link name what I want is Link name…
MMPL1
  • 533
  • 7
  • 21
0
votes
1 answer

Grav form redirection

Dear stackoverflowers, on the site iam currently developing there is a contact form on each subpage – form included from the /contact subpage. Iam able to send the form on each site, but it includes the /thankyou page in the content block and…
gustav
  • 336
  • 3
  • 12
0
votes
1 answer

GRAV CMS - redirection using

I'm using GRAV CMS on my site and would like to create a news page. I created the page using the template ready for the Blog, everything was as expected I only have one problem that when I click on the read more I would like to redirect to another…
0
votes
1 answer

"Illegal offset type in isset or empty" when using a Twig macro

Using Grav v1.3.8 (running on PHP 5.6.30), I'm currently getting a Server error ("Illegal offset type in isset or empty") when trying to render a Twig template that is using a macro. What's interesting is that this only happens when I use the macro…
domsson
  • 4,553
  • 2
  • 22
  • 40
0
votes
0 answers

Grav CMS: Output message in the Debug Bar from native PHP

I'm working on a custom Twig filter which resizes your images to a set width (and auto height). {# TWIG CODE #} {% set imgpath = page.header.custom.bgimage|first.path %}
Norman
  • 785
  • 7
  • 27
0
votes
2 answers

Send data from one page (CMS) to subdomain (platform)

I hope, that you are able to help me, or at least give me a few suggestions for a solution. Context: We have a grav CMS site containing general information, a blog etc (example.com). On a subdomain (test.example.com created in Ruby (backend) and…
JohnDoe
  • 507
  • 7
  • 21
0
votes
2 answers

grav modular page - separate content and sidebar

I want to create a page in grav, where I have a content area and a sidebar area. I want to use on modular.md root template in which I refer to a template that loops and displays both content and sidebar modules. My problem is: how to distinguish…
Jan Galinski
  • 11,768
  • 8
  • 54
  • 77
0
votes
0 answers

Docker-compose local volume mount osx

I am trying to create a simple local docker setup with Grav CMS (getgrav.org). I have successfully gotten the docker container to spin up and server me the proper files, however when I try to create a mounted volume for the "user" directory of the…
artemartemov
  • 163
  • 1
  • 8
0
votes
2 answers

Grav Form plugin error

I have implemented a form to register email of user so we can send them update. The form works perfectly on integration but without reason fails in production. When I tried to send the message I get a 500 post error with the following informations…
mhlsf
  • 303
  • 4
  • 14
0
votes
1 answer

How to get {{ pages }} object in a modular page

Any thoughts on how to get the pages object in a modular page? {{ dump(pages) }} returns null, but if I put the same statement in a regular page it works fine. I have a page field that only gives me the URL of the selected pages and I need to get…
Christopher
  • 412
  • 3
  • 11
0
votes
1 answer

How to redirect pages with php extension in GRAV

I created a new web site using Grav. The old site has pages that had to be accessed using urls ending .php The url /somefolder/somepage.php just gives me "File not found". It does NOT lead me to the built-in Grav error page. I disabled the error…
Eric Dela Cruz
  • 1,503
  • 1
  • 15
  • 20