Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In with Twitter
Powered by Vanilla. Made with Bootstrap.
Theme built by Kasper Kronborg Isager
img in a menu
  • it's been too long since i asked you something here LOL.
    is there an easy way to put an img in the menu?
    lets asume that the menu is not img based on the css.
    if i want to put just one img like a flag for country language..?
  • hi,

    the createLanguageMenu ([Implementation]/Feindura.html#createLanguageMenu) method comes with an flag image already :)

    but if you want to add an image you can easily do that by using the either the thumbnail of a page, so the user can upload the image for each page as well (needs to be activated in the page settings) or you manually add an image when createing the menu like this:
    foreach($feindura->createMenu('category',1,'ul') as $item) {
    echo $item['startTag'];
    if($item['link']) {
    echo '<img src="myimagePath">';
    echo $item['link'];
    echo $item['endTag'];

    this will create you an <img> tag inside the <li> tags of the <ul>.

    hope that helps..
  • thanks.
    trying to upload a thumbnail and it says "Couldnā€˜t resize the image."
    what is the image thumbnail size?

    method 2 did not work for me.
    how should i write the link? maybe i did it wrong.
  • it also says on the thumbnail upload dialog :
    Standard image size
    Width = 0 pixel
    Height = 0 pixel

    i have tried to set the img size manually, but that didnt help as well
  • you have to setup the thumbnail size in the admin settings first.
    then make sure to not upload to big images, due to the small server memory.

    to be able to see the thumbnail you also have to show it like this:
    foreach($feindura->createMenu('category',1,'ul') as $item) {
    echo $item['startTag'];
    if($item['link']) {
    echo $item['thumbnail']; // add this here
    echo $item['link'];
    echo $item['endTag'];

    then make sure you css settings are not in a way that they hide image in the <li>
  • ok..
    i know what is the problam. its because im working localy..
    thanks again
  • hm, that shouldn't be a problem....
    maybe your cms/upload/ folder hasn't the right permissions