title: how to generate url friendly in Joomla?
body: <p>I have a problem with joomla 1.5 friendly url (that not so friendly actually)
  I am not using SEF at the moment (should i ?)</p>
  
  <p>heres is my problem</p>
  
  <p>I have some categories and sections. Each has alias.</p>
  
  <p>so i can check all news category for example by visiting www.myxyz.com/news/</p>
  
  <p>to check an article the url that generated would become:
  www.myxyz.com/news/10-local-news-title-alias</p>
  
  <p>I have no idea how joomla generate that url. In my templates i need to generate some links to specific articles. </p>
  
  <p>so I create a helper in template: </p>
  
  <pre><code>
  // helper to get alias in mainMenu ... alias must be unique 
  function getMainMenu($menuAlias){
      $items = &JSite::getMenu();
      // Get Menu Items
      $rows = $items->getItems('alias', $menuAlias);
      if($rows){
          //$result = JRoute::_(JURI::base().$rows[0]->link);
          $result= JURI::base().substr(JRoute::_($rows[0]->link), strlen(JURI::base(true)) + 1);
          return $result;
      }else{
          return JURI::base() ;// aka not found
      }
  }
  </code></pre>
  
  <p>but when I enter the page like www.myabc.com/news/7-local-news-alias
  the url would become messed up and changed to wrong url.</p>
  
  <p>should I use SEF for joomla url friendly ?</p>