2014-09-10 65 views
0

我有一個問題。每一頁都得到相同的標題圖像。我用下面的代碼:每一頁的隨機圖像與ipSlot

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

我想選擇在每一頁上a![enter image description here][1]隨機圖像,而無需使用塊。

謝謝!

+0

圖片插槽可讓您指定圖像應顯示的頁面。你是什​​麼意思的「隨機」?你可以在這裏做很多事情。 – 2014-09-11 05:47:17

+0

我想在每個頁面上添加不同的圖像。 這是相同的現在:http://www.carehuidtherapie.nl/mashmedia/acne和http://www.carehuidtherapie.nl/mashmedia/Acne-bij-ouderen – 2014-09-11 06:47:38

回答

0

添加當前頁面ID爲圖像ID,你將不得不爲每個頁面獨立的圖像。例如:

$options = array('id' => 'Image' . ipContent()->getCurrentPage()->getId(), 'width' => '500', 'class' => 'cssclass(optional)'); 
echo ipSlot('image', $options); 
+0

THANK YOU!它現在有效 – 2014-09-11 10:02:23

0

當你選擇一個圖像時,在它下面有「應用」過濾器。選擇「當前頁面和所有子頁面」,你會得到你想要的。無需通過頁面ID進行破解。除非你想要。