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
1
vote
1 answer

Grav - Pass JSON data from Plugin to Twig

I want to retrieve a JSON from a webservice and incorporate it into a Twig template. I went through the docs and I found that I could use this option. I have followed the steps from the doc and I have prepared this…
M.E.
  • 4,955
  • 4
  • 49
  • 128
1
vote
2 answers

Grav - Retrieving specific items from page in template

I have the following page structure in Grav: # Title ## Subtitle ### Subsubtitle The page structure is always the same and it has just those three items. How can I retrieve each item (Title/Subtitle/Subsubtitle) separately in Twig template? The…
M.E.
  • 4,955
  • 4
  • 49
  • 128
1
vote
1 answer

Use image from theme/image folder in twig template

I would like to include an image from custom_theme/images folder where custom_theme is a custom theme created following the grav documentation. The twig template is in partials and this is the excerpt:
M.E.
  • 4,955
  • 4
  • 49
  • 128
1
vote
2 answers

Grav/Twig - Filter summary to remove markdown format

I want to use {{ page.summary }} as summary for front page index of posts. However I find that summary delivers Markdown, so if the post begins with a header: # Header 1 Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque aliquam…
M.E.
  • 4,955
  • 4
  • 49
  • 128
1
vote
2 answers

Grav CMS get the url of uploaded file

I created file upload section header.custom.portsPositionFile: type: file destination: 'user/themes/hlg/uploads' label: Select file with port position list accept: - .pdf Now I want to…
MMPL1
  • 533
  • 7
  • 21
1
vote
1 answer

GRAV Unable to find grav-plugin-editable

I'm working on GRAV in order to offer a user friendly UX to edit the content. I found some nice plugins, but i cant find the coolest of them : GRAV-PLUGIN-EDITABLE which allow user to edit directly in the front-end views of the site with…
1
vote
2 answers

GRAV cms - constant footer or sidebar

I wanna have a constant sidebar or footer that i can edit in the grav admin backend. Cant find any similar example on the web. At the moment i have a normal page folder structure: pages ├── 01.home ├── 02.contact └── 03.program now i wanna…
gustav
  • 336
  • 3
  • 12
1
vote
0 answers

Multiple blocks in Grav cms twig template

I am making a Grav template from a static html. This is a one-pager, so I am using modular templates and content. The problem is that I have a gallery, and my clicking on an image, a modal pops up. The code for the modals are places outside the…
dr. squid
  • 786
  • 2
  • 6
  • 14
1
vote
2 answers

Parsing and using list item content via Twig

I am experimenting with using Grav to create my next website. One of the things I would be able to do is to build a unordered list using data provided in Grav frontmatter from the Grav page that uses the template. Here is how I am trying to do…
DroidOS
  • 8,530
  • 16
  • 99
  • 171
1
vote
0 answers

Teething troubles with Grav CMS

I have followed the instructions on installing Grav + Admin on by Ubuntu 16.04 server running Nginx here and configured + restarted the Nginx server as explained https://learn.getgrav.org/webservers-hosting/servers/nginx. I then browsed to…
DroidOS
  • 8,530
  • 16
  • 99
  • 171
1
vote
1 answer

Generating boostrap rows in twig

I have a grav-content like this: ### Some title Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec a mauris purus. ??START?? ##### [fa=certificate/] Certificate ##### [fa=line-chart/] Process ##### [fa=newspaper-o/] …
1
vote
1 answer

Got 200 on an URL that should gives a 404

I just passed my website made with Grav on the Spaghetti scanner. It listed a lot of common used files and folders. I tried many of those knowing those files and folders didn't exist at all on my webserver. Every links (like…
Shikiryu
  • 10,180
  • 8
  • 49
  • 75
1
vote
1 answer

PHP XML Library is not installed Grav Issues Found

I'm just starting to use Grav but I can't proceed as I'm trying to use Grav in my local Scotch Box 3.0. I already have updated PHP using brew on my Mac but It seems like Grav still couldn't find it. Any advice? Thanks
1
vote
2 answers

can't get twig to find media file in Grav usingHTML5 audio element

In a Grav template, which uses Twig, I have Nothing is rendered and when I do View Source, what I see is
1
vote
1 answer

Grav CMS: how to show/hide parts of the page depending on conditions?

The Grav's documentation clearly describes how a whole page or a folder could be hidden from unregistered users. It also describes how a whole page could be seen only by particular user groups. But what about pieces of a page, let's say, some links…