Skip to content
● Meet Grav Guard: keep every Grav site you run secure and up to date, all from one place. Free for up to 3 sites. Read more →

Path for images is incorrect on child pages

Started by Nathan da Silva 7 years ago · 0 replies · 674 views
7 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 Anna, 2 days ago
2 53 16 hours ago
Forms & Blueprints · by Anna, 3 days ago
7 82 16 hours ago
Forms & Blueprints · by Anna, 1 week ago
5 186 6 days ago
Forms & Blueprints · by TomW, 1 month ago
3 379 1 month ago
Forms & Blueprints · by Japhy, 2 months ago
2 595 2 months ago