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

Path for images is incorrect on child pages

Started by Nathan da Silva 6 years ago · 0 replies · 500 views
6 years ago

So I have a file called cliendland.yaml and I have a blueprint which shows up custom fields for all child pages of /clients/

The issue I am having is that the URL when I do the following:-

TWIG
{% for key, img in header.custom.ClientHero %}
    <div id="service-hero" class="page-hero" style="background-image: url({{ key }});">
{% endfor %}

The path for key is showing as:

/clients/user/pages/02.clients/04.main-contractors/contractor-hero-header.jpg

Whereas the file is actually storing it here:

/user/pages/02.clients/04.main-contractors/contractor-hero-header.jpg

You will see that the issue is that it is adding /clients/, either the file is storing in the wrong location or there is an issue with my blueprint file.

Any ideas?

last edited 05/07/20 by Nathan da Silva

Suggested topics

Topic Participants Replies Views Activity
Forms & Blueprints · by Ton Haarmans, 6 years ago
13 1863 6 months ago
Forms & Blueprints · by Hugo Oliveira, 7 months ago
0 451 7 months ago
Forms & Blueprints · by Flachy Joe, 8 months ago
9 548 8 months ago
Forms & Blueprints · by Augustus, 9 months ago
7 570 9 months ago
Forms & Blueprints · by Julien, 9 months ago
10 590 9 months ago