how add image to link by page id

sky writer

Very nice.  How would I go about making this a horizontal menu.  I've styled as I've done with other horizontal menus I use, but the internal div's seem to be breaking things.  If I take out the internal div's and put just one div outside the show_menu code, then it works horizontally.  But the menu title appears to the right of the image, instead of below, which is what I want.

Any direction would be greatly appreciated.

DarkViper

a easy, but not the cleanest way::

save files like:
/wb/media/gallerys/kelione-i-ventes-raga/thumb/kelione-i-ventes-raga-55.jpg
/wb/media/gallerys/kelione-i-ventes-raga/thumb/kelione-i-ventes-raga-56.jpg

then use
<?php
show_menu2
(0SM2_CURR+1SM2_CURR+20,  '<div class="image_title"> <div class="imagep">
    [a]<img src="/wb/media/gallerys/kelione-i-ventes-raga/thumb/kelione-i-ventes-raga-[page_id].jpg" alt="" border="0" width="230" height="130" />[/a]
 </div>[menu_title]</div>'
);
?>

[url=http://www.youtube.com/watch?v=tmzDAz6ZvFQ]Der blaue Planet[/url] - er ist nicht unser Eigentum - wir haben ihn nur von unseren Nachkommen geliehen[br]
[i]"You have to take the men as they are... but you can not leave them like that !" :-P [/i]
[i]Das tägliche Stoßgebet: [b]Oh Herr, wirf Hirn vom Himmel ![/b][/i]

sky writer

I am very interested in this functionality.  Were you ever able to get the results you were after?

nps

Yes, i'm found about page_id, but $image_arr is php. Try but not wirked with [page_id]. Try php variable $page_id but show parent menu id.

BerndJM

Hi,

if you have a closer look to the SM2 documentation (to find in the modules directory) you will see in the section
"FORMAT STRINGS"
the following:
Quote[page_id]       Page ID of the current menu item

Regards Bernd
In theory, there is no difference between theory and practice. But, in practice, there is.

nps

My code

$image_arr = array(
55 => '/media/gallerys/kelione-i-ventes-raga/thumb/kelione-i-ventes-raga-026.jpg',
56 => '/media/gallerys/kelione-i-ventes-raga/thumb/kelione-i-ventes-raga-023.jpg'
);


show_menu2(0, SM2_CURR+1, SM2_CURR+2, 0,  '<div class="image_title"> <div class="imagep">
    [a]<img src="'.$image_arr[55].'" alt="" border="0" width="230" height="130" />[/a]
</div>[menu_title]</div>');

how add image from array 'image_arr' in show_menu2? (55 and 56 is pages id)