0

I have a problem. Every page gets the same header image. I use following code:

<?php
    $options = array('id' => 'Image', 'width' => '500', 'class' => 'cssclass(optional)');
    echo ipSlot('image', $options);
?>

I would like to choose a![enter image description here][1] random image on each page without using blocks.

Thanks!

Kamiccolo
  • 7,758
  • 3
  • 34
  • 47
  • Image slot allows you to specify for which pages that image should be displayed. And what do you mean by "random"? You can do multiple things here. – Audrius Jankauskas Sep 11 '14 at 05:47
  • I want to add a different image on each page. This is the same now: http://www.carehuidtherapie.nl/mashmedia/acne and http://www.carehuidtherapie.nl/mashmedia/Acne-bij-ouderen – Roy Dekker Sep 11 '14 at 06:47

2 Answers2

0

Add current page id as an image ID and you will have separate image for each page. Eg.:

$options = array('id' => 'Image' . ipContent()->getCurrentPage()->getId(), 'width' => '500', 'class' => 'cssclass(optional)');
echo ipSlot('image', $options);
Mangirdas Skripka
  • 1,647
  • 1
  • 15
  • 14
0

When you select an image, there's "Apply to" filter below it. Choose "Current page and all subpages" and you'll get what you want. No need to hack through page IDs. Unless you want that.