[TYPO3] adding a dynamic image to the menu from the backend?

Bryan support at chillifactory.co.za
Mon Nov 20 13:31:46 CET 2006


Hi all,

can't seem to figure this one out. I'm trying to add an image to the 
menu. "<td id="photo1">Pho1</td>"

Here is the current site where I'm trying to put it into practice.
http://dedi13b.your-server.co.za/smiths/index.php?id=35
You can see by it, I would like to show an image for the related 
product. Black spoon in menu = black spoon image etc.

Any idea how to implement this and where I should put the image? I would 
like to make it dynamic, so the client can later change the image from 
the backend etc.

Thanks for your help in advance.
Bryan
--

This is my current TSconfig for the +ext: menu_products below.

# Menu products cObject

lib.navigation = COA
lib.navigation {
  wrap (
<table height="100%"  border="0" cellpadding="0" cellspacing="0">
   <tr>
    <td height="125">
     <table id="photo_table" width="234" height="125" border="0" 
cellpadding="0" cellspacing="0">
      <tr>
        <td colspan="3" height="1" bgcolor="#333333"></td>
      </tr>
      <tr>
       <td 
background="fileadmin/template/main/images/smiths-product-left.jpg" 
width="10"></td>
       <td id="photo1">Pho1</td>
       <td 
background="fileadmin/template/main/images/smiths-product-right.jpg" 
width="7"></td>
      </tr>
     </table>
    </td>
   </tr>
     </table>
    </td>
   </tr>
</table>
)

  ### You might want to do these bits differently and make them dynamic...
  ###

  5 = HTML
  5 {
    value = More Products
    value.wrap ( <tr>
<td width="10" height="20"><img src="clear.gif" width="10" height="20" 
alt=""></td>
<td background="fileadmin/template/main/images/product-submenu_01.jpg" 
width="224" height="20" class="more">|</td>
</tr>
)
  }

  10 = HMENU

  10 {
    begin = 1
    entryLevel = 1
    1 = TMENU
    1 {
      noBlur = 1
      crop = 21 |
      NO {
        wrapItemAndSub ( <tr>
<td width="10" height="21" id="product_menu"><img src="clear.gif" 
width="10" height="21" alt=""></td>
<td background="fileadmin/template/main/images/product-submenu_01.jpg" 
colspan="3" width="224" height="20"><li id="menu">|</li></td>
</tr>
)
      crop = 21 |
      }

      ACT = 1
      ACT < .NO
      ACT.wrapItemAndSub = <li class="current">|</li>
    }
  }
}



More information about the TYPO3-english mailing list