title: call models function in the view in joomla?
body: <p>I have the following function in my model</p>
  
  <pre><code>function abc_list(){
  
          global $mainframe;
  
          $db      =&amp; JFactory::getDBO();
  
              echo '&lt;ul&gt;&lt;li class="all"&gt;&lt;a class="ajax_all" href="#"/&gt; alle &lt;/a&gt;&lt;/li&gt;';     
  
                  foreach(range('a','z') as $i):{
  
                                      $query = "SELECT * FROM #__glossary WHERE tterm  LIKE '$i%' AND published = 1";
  
                                      $db-&gt;setQuery( $query );
  
                                      $css .= '&lt;li class = "searchAbc"&gt;';
  
                                      $rows = $db-&gt;loadObjectList();
  
                                      if ($rows){
  
                                      $css .= '&lt;a class="button" href="\''.$i.'" value="'.$i.'"/&gt;'.$i.'&lt;/a&gt;';}
  
                                      else {
  
                                      $css .= $i;    
  
                                      }
  
                                      $css .='&lt;/li&gt; &lt;/ul&gt;';
  
  
                                      }
                          endforeach; 
  
                                      return $css;
  
           }
  </code></pre>
  
  <p>and I would like out up in my view, but because of some reasons doesn't really works.  </p>
  
  <p>I was trying this in the following way</p>
  
  <pre><code>$abc          = $this-&gt;get('abc_list');
  </code></pre>
  
  <p>in this case the $abc variable seems to be empty.</p>