Im currently busy with working on a website but I got stuck. The site is running on Processwire and working with the FeatherLight lightbox.
Now the strange thing is, I am only able to see the images when I'm logged in as admin. When I'm just a guest (incognito) the site won't show these images but shows the other pages.
You can find the website over here
I've looked at the page settings in the CMS, and the guest is able to view the pages, as it also does with the text pages.
But I can't figure out how to get the images back.
Here is the code
<div id="container">
<div class="grid-sizer"></div>
<?php if ($page->numChildren(true)) {
echo "<ul class='project'>";
foreach ($page->children as $childIndex => $child) {
if ($child->head_image) {
$image = $child->head_image;
echo "<li class='item'><a href='#' data-featherlight='#mylightbox" . $childIndex . "'><img id='mylightbox" . $childIndex . "' src='{$image->url}' class='image'></a></li>";
}
}
echo "</ul>";
}
?>
<style>
.featherlight-content:after {
content: "<?php echo nl2br($child->title); ?> <?php echo nl2br($child->image_description); ?> <?php echo $child->formaat; ?>";
}
</style>
Thanks in advance!
` in your DOM, which means that either `$page->children` is empty or `$child->head_image` does not evaluate to true. – masterfloda Jun 30 '17 at 23:23