Viernes, 25 Julio 2014 11:21
beggarly

Group by

Groups your news by sections or by categories

Group by

Postby recived » Tue Sep 15, 2009 6:04 am

If you select Category, then the reference output component / content / (Not sef), if the Section then everything is fine (mysite.com / page.html), help to solve the problem please
recived
Fresh Boarder
Fresh Boarder
 
Posts: 5
Joined: Tue Sep 15, 2009 3:27 am

Re: Group by

Postby recived » Tue Sep 15, 2009 6:44 am

How do sef?
Code: Select all
     if ( $global == 'c' ) {
      
            if ( $catlist ) {
               $catids = explode( ',', $catlist );
               JArrayHelper::toInteger( $catids );
               $condition .= ' AND (c.id=' . implode( ' OR c.id=', $catids ) . ')';
            } elseif ( $catexc ) {
               $catids = explode( ',', $catexc );
               JArrayHelper::toInteger( $catids );
               $condition .= ' AND (c.id!=' . implode( ' AND c.id!=', $catids ) . ')';
            }
         
          $query = 'SELECT c.*, ' .
         ' CASE WHEN CHAR_LENGTH(c.alias) THEN CONCAT_WS(":", c.id, c.alias) ELSE c.id END as slug' .
         ' FROM #__categories AS c' .
         ' INNER JOIN #__sections AS s ON s.id = c.section' .
         ' WHERE s.scope = "content"' .
         ($access ? ' AND c.access <= ' .(int) $aid : '').
         ($condition!='' ? $condition : '').
         ' AND c.published = 1' .
         ' ORDER BY c.section, '. $ordering;
         
        } else {
      
          $query = 'SELECT s.* ' .
         ' FROM #__sections AS s' .
         ' WHERE s.scope = "content"' .
         ($access ? ' AND s.access <= ' .(int) $aid : '').
         ($condition!='' ? $condition : '').
         ' AND s.published = 1' .
         ' ORDER BY '. $ordering;
      }
recived
Fresh Boarder
Fresh Boarder
 
Posts: 5
Joined: Tue Sep 15, 2009 3:27 am

Re: Group by

Postby chus » Thu Sep 17, 2009 2:42 am

Hi,

This module builds the links using joomla's ContentHelperRoute class. I think you need to do is to create a menu item for each category or section included in your News modules in order to have them all SEF.

Best Regards!
User avatar
chus
Administrator
Administrator
 
Posts: 455
Joined: Thu Sep 13, 2007 2:21 am
Location: Costa Rica


Return to Global News



Who is online

Users browsing this forum: No registered users and 1 guest