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

Community guidelines

Please keep discussions civil and on-topic. Repeated violations may lead to a temporary ban.

Content & Markdown

Gateway theme: Months_of_the_year

Solved by Gisle Hannemyr View solution

Started by Gisle Hannemyr 6 years ago · 2 replies · 725 views
6 years ago

I've read this issue, but I am still unable to resolve this.

I have a Grav website running a clean install of the Gateway skeleton. The skeleton comes with directory system/languages that contains the standard languages files, including en.yaml, which contains:

YAML
GRAV:
  
  MONTHS_OF_THE_YEAR: ['January', 'February',  ]
  

However, the blogpost sample pages display the date like this: "MONTHS_OF_THE_YEAR[5] 27, 2014" - so it is obviously not picking up this array with the actual names of the month from en.yaml.

It looks like the problem is specific to Gateway. If I copy the blog pages from Gateway to the default Quark theme, dates display correctly, with the name of the month appearing.

last edited 05/11/20 by Gisle Hannemyr
6 years ago

@gisle, The pull request from Aug '19 has however not been merged yet...

So for the time being, you will have to fix it yourself. You have 2 options:

  1. Create file '/user/languages/en.yaml' and add the following line:
    TXT
    MONTHS_OF_THE_YEAR: [January, February, March, April, May, June, July, August, September, October, November, December]
    
  2. Or, apply the suggested fix in the pull request yourself in '/user/themes/gateway/templates/partials/blog-item.html.twig' by replacing 'MONTHS_OF_THE_YEAR' with 'GRAV.MONTHS_OF_THE_YEAR'.

    Note: If you make any changes to a downloaded theme, please be advised that customisations will be lost when updating the theme. Best to use an inherited/child theme and apply changes to the child.

Btw I have updated the post you're referring to and corrected the '/usr' typo's into '/user'

last edited 05/11/20 by pamtbaau

Suggested topics

Topic Participants Replies Views Activity
Content & Markdown · by Jochen, 8 months ago
6 96 8 months ago
Content & Markdown · by Ton Haarmans, 1 year ago
10 184 1 year ago
Content & Markdown · by Jan L'Am, 1 year ago
4 147 1 year ago
Content & Markdown · by Leonardo, 1 year ago
3 61 1 year ago
Content & Markdown · by belthasar, 1 year ago
4 255 1 year ago