if ($this->_foreach['lastViewed']['total'] > 0) { foreach ($_from as $this->_tpl_vars['item']) { $this->_foreach['lastViewed']['iteration']++; ?> <span> <a title="<?php echo $this->_tpl_vars['item']['item_summary']; ?> " accessKey="<?php echo $this->_foreach['lastViewed']['iteration']; ?> " href="<?php echo smarty_function_sugar_link(array('module' => $this->_tpl_vars['item']['module_name'], 'action' => 'DetailView', 'record' => $this->_tpl_vars['item']['item_id'], 'link_only' => 1), $this); ?> "> <?php echo $this->_tpl_vars['item']['image']; ?> <span><?php echo $this->_tpl_vars['item']['item_summary_short']; ?> </span> </a> </span> <?php } } else { ?>
?> »</a><br /> <ul class="cssmenu"> <div class="bigmenu"> <?php $_from = $this->_tpl_vars['moduleExtraMenu']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); } $this->_foreach['moduleList'] = array('total' => count($_from), 'iteration' => 0); if ($this->_foreach['moduleList']['total'] > 0) { foreach ($_from as $this->_tpl_vars['name'] => $this->_tpl_vars['module']) { $this->_foreach['moduleList']['iteration']++; ?> <li><?php echo smarty_function_sugar_link(array('id' => "moduleTab_" . $this->_tpl_vars['name'], 'module' => $this->_tpl_vars['name'], 'data' => $this->_tpl_vars['module']), $this); ?> </li> <?php } } unset($_from); ?> </div> </ul> </li> <?php } ?> </div> <?php
public function testCreatingFullLink() { $output = smarty_function_sugar_link(array('module' => 'Dog', 'action' => 'cat', 'id' => 'foo1', 'class' => 'foo4', 'style' => 'color:red;', 'title' => 'foo2', 'accesskey' => 'B', 'options' => 'scope="row"', 'label' => 'foo3'), $this->_smarty); $this->assertContains('<a href="index.php?module=Dog&action=cat" id="foo1" class="foo4" style="color:red;" scope="row">foo3</a>', $output); }