Jump to content

Recommended Posts

Posted

Hi there,

I'm facing the following problem:

PW 3.0.123 installation with markup regions as templating.
In the _main.php I have in the header this:

<header id="header">
  .
  .
  .
	<figure id="header_image">
		<img src="<?=$page->image_header->size(1024,200)->url;?>" alt="<?=$page->image_header->description;?>" width="1024" height="200">
	</figure>
</header>

I created an image field (image_header) and most of the templates (internal, not the ftp templates) has this image field, so on every page the editor can place a different header image.
Now, there is a page, that has a lot of children, and all these subpages shall have the parent header image. In the child-template I put this code:

<figure id="header_image" pw-replace>
		<img src="<?=$page->parent->image_header->size(1024,200)->url;?>" alt="<?=$page->parent->image_header->description;?>" width="1024" height="200">
</figure>

The result is a really weird code, and as you see, the »pw-replace« is still there:

<html lang="de"><head></head><body id="html-body"><figure id="header_image" pw-replace="">
		<img src="/site/assets/files/1052/kalender.1024x200.jpg" alt="Maya Kalender" width="1024" height="200">
	</figure>
	<meta http-equiv="content-type" content="text/html; charset=utf-8">
	<meta name="viewport" content="width=device-width, initial-scale=1">
  .
  .
  

This is setup of the field image_header:
max files allowed: 1
single item
required

Posted

Are you talking about an overview page that lists all children or are you talking about a single page view of one of the child pages?

Maybe you can provide more code and not only the sinppets? The forum has a spoiler feature (the eye symbol) where you put all code without messing the post too much.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...