Skip to content
● Grav 2.2 is out: 2x faster cold starts and 96% less memory on big sites. Read the announcement →

Path for images is incorrect on child pages

Started by Nathan da Silva 6 years ago · 0 replies · 597 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 Japhy, 2 weeks ago
2 275 4 days ago
Forms & Blueprints · by FrViPofm, 4 weeks ago
5 330 4 weeks ago
Forms & Blueprints · by Ton Haarmans, 6 years ago
13 2322 8 months ago
Forms & Blueprints · by Hugo Oliveira, 9 months ago
0 782 9 months ago
Forms & Blueprints · by Flachy Joe, 10 months ago
9 871 10 months ago