Page 1 of 1

Content Manager - how to display the image

Posted: Fri Feb 16, 2024 12:29 pm
by caigner
In the Content Manager Module one can select an image on the Option tab.

The module help page says:
Image
This property allows associating a previously uploaded image with your this content item. Editors can select an image file from the uploads/images directory. This image may be displayed on the generated HTML page (if applicable), or used when building the navigation.
Unfortunately the help does not say what has to be done to display the image on the webpage.

What do I have to include in my template to display this image?

Code: Select all

{content_image} 
alone does not work and

Code: Select all

{content_image block="image1"}
inserts a new image input field (which I don't need as there is already one).

Please advise.
Thanks!

Re: Content Manager - how to display the image

Posted: Fri Feb 16, 2024 3:35 pm
by DIGI3
I generally use that field for building image navs, as it can be accessed in Navigator templates with $node->image. To access it in a page template you can use {$pageVars.pageImage}. Personally I'd use {content_image} instead as then you can set a lot more parameters and put it in a tab editors will find.

Re: Content Manager - how to display the image

Posted: Fri Feb 16, 2024 4:08 pm
by caigner
Ok, I will do as you suggested.

Thanks!