-
AuthorPosts
-
noibihappy2009 Friend
noibihappy2009
- Join date:
- January 2009
- Posts:
- 62
- Downloads:
- 0
- Uploads:
- 8
- Thanked:
- 6 times in 1 posts
February 5, 2009 at 7:27 am #137803In default janews layout is
1|6
2|7
3|8
4|9
5|10But i want change to
1|2
3|4
5|6
…..
Have anyways to do ?2. And beside that
When i have no spec cat/sec entered in module params.
I dont whats kind of sorting ???but i want it’ll sort by
section.title AND cat.title AND article.titleThank you
Anonymous ModeratorJA Developer
- Join date:
- September 2014
- Posts:
- 9914
- Downloads:
- 207
- Uploads:
- 152
- Thanks:
- 1789
- Thanked:
- 2008 times in 1700 posts
February 6, 2009 at 3:18 am #289811Hi noibihappy2009,
Please go to this link http://www.joomlart.com/forums/topic/how-to-vary-layout-loop-in-blog-php-ja_news/ to solve your issue.
noibihappy2009 Friendnoibihappy2009
- Join date:
- January 2009
- Posts:
- 62
- Downloads:
- 0
- Uploads:
- 8
- Thanked:
- 6 times in 1 posts
February 7, 2009 at 9:46 am #290015<em>@JA Developer 110203 wrote:</em><blockquote>Hi noibihappy2009,
Please go to this link http://www.joomlart.com/forums/topic/how-to-vary-layout-loop-in-blog-php-ja_news/ to solve your issue.</blockquote>
Hi,
But stil have one 1 more question still not solve.
When i have no type spec cat in module param. I dun’t know how query ORDER use to query ???
But i want it must be
ORDER BY s.title, c.title
and when it dislay must be group be s (dislay cat group by s)Example
Sec A
– Cat A1
– Cat C2
– Cat D3
– Cat F4
Sec B
– Cat A
– Cat A2
– Cat C
– Cat D1And when dislay will show
– Cat A1
– Cat C2
– Cat D3
– Cat F4
// Because section A is first
– Cat A
– Cat A2
– Cat C
– Cat D1
// Because section B is nextIn this moment look like your query will ORDER by cat, so
– Cat A
– Cat A1
– Cat A2
– Cat C
– Cat C2
…..Is it ok ?
Thank youAnonymous ModeratorJA Developer
- Join date:
- September 2014
- Posts:
- 9914
- Downloads:
- 207
- Uploads:
- 152
- Thanks:
- 1789
- Thanked:
- 2008 times in 1700 posts
February 10, 2009 at 7:30 am #290388HI noibihappy2009,
This order of section is according to the order of Category (Section) ID textbox.
Anonymous ModeratorJA Developer
- Join date:
- September 2014
- Posts:
- 9914
- Downloads:
- 207
- Uploads:
- 152
- Thanks:
- 1789
- Thanked:
- 2008 times in 1700 posts
February 10, 2009 at 7:32 am #290389Open helper.php file in modulesmod_janews folder, at about line 285, find following code section:
function getAllCatIds ($catorsec) {
$db =& JFactory::getDBO();
if($catorsec){
$query = "SELECT id FROM #__categories WHERE published = 1;";
}
else{
$query = "SELECT id FROM #__sections WHERE published = 1;";
}
$db->setQuery($query);
$c = $db->loadObjectList();
$catids = array();
foreach($c as $_c) $catids[] = $_c->id;
return $catids;
}function getAllCatIdsBySection ($sectionid) {
$db =& JFactory::getDBO();
$query = "SELECT id FROM #__categories WHERE section = $sectionid;";$db->setQuery($query);
$c = $db->loadObjectList();
$catids = array();
foreach($c as $_c) $catids[] = $_c->id;
return $catids;
}Here you can change the order of categories.
-
AuthorPosts
This topic contains 5 replies, has 2 voices, and was last updated by Anonymous 15 years, 11 months ago.
We moved to new unified forum. Please post all new support queries in our New Forum