title: SEF url from module in joomla
body: <p>I am making a module and trying to figure out how to get the Search engine friendly url to articles from this module</p>
  
  <p>this is the helper class today</p>
  
  <pre><code>public function getItems($amount)
  {
  $db = &amp;JFactory::getDBO();
  
  
  $query = 'SELECT * FROM `#__content`, `#__content_frontpage` WHERE `#__content_frontpage`.content_id = `#__content`.id AND `#__content`.state = 1 ORDER BY `#__content`.publish_up DESC LIMIT ' . $amount  . '';
  
  
  
  $db-&gt;setQuery($query);
  $items = ($items = $db-&gt;loadObjectList())?$items:array();
  
  
  
  return $items;
  } //end getItems
  </code></pre>
  
  <p>And this is the default.php to display stuff</p>
  
  <pre><code>&lt;ul class="frontpage_news"&gt;
      &lt;?php foreach ($items as $item) { ?&gt;
      &lt;li&gt;
      &lt;div class="frontpage_date"&gt;&lt;?php echo JText::sprintf('DATE_FRONTNEWS', $item-&gt;publish_up); ?&gt;&lt;/div&gt;
      &lt;div id="ffTitle" class="frontpage_title"&gt;&lt;a href="#"&gt;&lt;?php echo JText::sprintf('TITLE_FRONTNEWS', $item-&gt;title); ?&gt;&lt;/a&gt;&lt;/div&gt;
      &lt;div id="ffRead" class="frontpage_readmore"&gt;&lt;a href="#"&gt;&lt;?php echo JText::sprintf('READ_MORE_FRONTNEWS'); ?&gt;&lt;/a&gt;&lt;/div&gt;
      &lt;/li&gt;
      &lt;?php } ?&gt;
  &lt;/ul&gt;
  </code></pre>
  
  <p>So how do I get the correct link to each article displayed in SEF format?</p>
  
  <p>Thanks for any help! </p>