• twitter image
  • facebook image
  • youtube image
  • linkedin image
Language: CMS Made Simple Czech CMS Made Simple France CMS Made Simple Hungary CMS Made Simple Russia CMS Made Simple Netherlands

All times are UTC




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: [Solved] [confirmed] Menumanger $node->image
PostPosted: Sat Jul 07, 2012 5:59 pm 
Offline
Power Poster
Power Poster

Joined: Mon May 29, 2006 1:20 pm
Posts: 1938
Location: Rouen
Hi,

using the accessible_simple_navigation.tpl on Left simple navigation + 1 column
{menu template='accessible_simple_navigation.tpl' collapse='1'}

accessible_simple_navigation.tpl on line 36 I have add
Code:
{if $node->image != ''}&nbsp;&nbsp;<img src="{$node->image}" alt="" />{/if}
at the end

so the line is
Code:
<li><a href="{$node->url}"{if $node->accesskey != ''} accesskey="{$node->accesskey}"{/if}{if $node->tabindex != ''} tabindex="{$node->tabindex}"{/if}{if $node->titleattribute != ''} title="{$node->titleattribute}"{/if}{if $node->target != ''} target="{$node->target}"{/if}><dfn>{$node->hierarchy}:</dfn><span>{$node->menutext}</span>{if $node->image != ''}&nbsp;&nbsp;<img src="{$node->image}" alt="" />{/if}</a>


into the page default_templates add an image in tag Options /Image

On the web page No image into the menu But
Notice: Undefined property: stdClass::$image in \tmp\templates_c\b8312...c7838.module_file_tpl.MenuManager;accessible_simple_navigation.tpl.php on line 87
Code:
line 87 : </span><?php if ($_smarty_tpl->tpl_vars['node']->value->image!=''){?>&nbsp;&nbsp;<img src="<?php echo $_smarty_tpl->tpl_vars['node']->value->image;?>


same test on version 1.10.3 no error message and the image is correct into the menu

_________________
Jean-Claude Etiemble


Last edited by jce76350 on Mon Jul 09, 2012 12:05 pm, edited 1 time in total.

Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: [confirmed] Menumanger $node->image
PostPosted: Sat Jul 07, 2012 6:54 pm 
Offline
Dev Team Member
Dev Team Member
User avatar

Joined: Wed Apr 23, 2008 7:53 am
Posts: 7668
Location: The Netherlands
confirmed in rev. 8167

Good catch, jce76350!!

_________________
Image

Did my post help you solving a problem at your (customers) website and it saved you many hours of work? Great!! Consider buying me a cup of coffee in return!



Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: [confirmed] Menumanger $node->image
PostPosted: Sun Jul 08, 2012 5:01 pm 
Offline
Dev Team Member
Dev Team Member
User avatar

Joined: Tue Oct 19, 2004 6:44 pm
Posts: 8099
Location: Fernie British Columbia, Canada
Note, the expression should be: {if isset($node->image) && $node->image != ''}...{/if}
because the $node->image is only set for the appropriate content pages.

Secondly, I think the issue with the image not being displayed is because of where you stuck the expression.... its the 'catch all' expression for nodes that don't have children, aren't separators or section headers, and aren't the active page.

_________________
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: [confirmed] Menumanger $node->image
PostPosted: Mon Jul 09, 2012 12:04 pm 
Offline
Power Poster
Power Poster

Joined: Mon May 29, 2006 1:20 pm
Posts: 1938
Location: Rouen
Hi,
Quote:
Note, the expression should be: {if isset($node->image) && $node->image != ''}...{/if}
because the $node->image is only set for the appropriate content pages.

Ok Thanks that's solved the problem no error and image is displayed

_________________
Jean-Claude Etiemble


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
A2 Hosting