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

Problem in page _portfolio of agency theme

Started by Muut Archive 11 years ago · 3 replies · 320 views
11 years ago

I have downloaded the agency skeleton to adapt it for my own site. Everything seems to work as it should except for the _portfolio page. This page shows a bunch of clickable thumbnail images. If you click one of them you should go to an expanded version of it with more details and text. It works with the first one, but cliking any other one also leads to the first one. I've noticed that neither 'modal-id' nor 'date' are properly read because both of them have value 0 no matter which thumbnail image you click in. Checking user/themes/agency/templates/modular/portfolio.html.twig I can't spot any problem. Can anyone provide a hint here?

11 years ago

I have just solved the problem by replacing modal-id and project-date by modalid and projectdate both in user/themes/agency/templates/modular/portfolio.html.twig and in user/pages/01.home/_portfolio. Apparently, using a dash in the variable name is not valid.

11 years ago

Good catch, you can't use a dash in a variable name, although you can use underscore. But this probably should be addressed in the theme. Would you mind creating an issue on the project so we can track and get this fixed in a future release:

https://github.com/getgrav/grav-theme-agency/issues

Thanks!

Suggested topics

Topic Participants Replies Views Activity
Archive · by Deleted User, 9 years ago
0 1319 9 years ago
Archive · by Muut Archive, 9 years ago
2 915 9 years ago
Archive · by Muut Archive, 9 years ago
2 4045 9 years ago
Archive · by Muut Archive, 9 years ago
1 2920 9 years ago
Archive · by Muut Archive, 9 years ago
3 1104 9 years ago