-
AuthorPosts
-
Greg Banig Friend
Greg Banig
- Join date:
- September 2014
- Posts:
- 41
- Downloads:
- 0
- Uploads:
- 5
- Thanks:
- 13
- Thanked:
- 2 times in 1 posts
November 7, 2009 at 7:28 pm #148391I am using JA News 2 in the JA Teline III template.
How can I control the display order of the categories? I have a Section with three Categories.
1) Category 1 = “Southern”
2) Category 2 = “Central”
3) Category 3 = “Northern”I would like them to display in JA News 2 in this order.
However, the Categories are displayed Northern, Southern, Central.
Anonymous ModeratorJA Developer
- Join date:
- September 2014
- Posts:
- 9914
- Downloads:
- 207
- Uploads:
- 152
- Thanks:
- 1789
- Thanked:
- 2008 times in 1700 posts
November 10, 2009 at 9:48 am #331500Hi gregbanig
For the case, i think you should order these categories via ordering field and then open modules/ja_news2/helper.php file, at about line 413, find following code:
$query = "SELECT `id`, `title`, `description`, CASE WHEN CHAR_LENGTH(`alias`) THEN CONCAT_WS(":", `id`, `alias`) ELSE `id` END as `slug` FROM `#__categories` s WHERE published = 1 and section=" . ( int ) $sid . $where;
$db->setQuery ( $query, 0, $limit );
and change to:
$query = "SELECT `id`, `title`, `description`, CASE WHEN CHAR_LENGTH(`alias`) THEN CONCAT_WS(":", `id`, `alias`) ELSE `id` END as `slug` FROM `#__categories` s WHERE published = 1 and section=" . ( int ) $sid . $where;$query .= " ORDER BY s.ordering ASC"; //$query .= " ORDER BY s.id ASC";
$db->setQuery ( $query, 0, $limit );
3 users say Thank You to JA Developer for this useful post
November 11, 2009 at 6:14 pm #331502<em>@JA Developer 152249 wrote:</em><blockquote>Hi gregbanig
For the case, i think you should order these categories via ordering field and then open modules/ja_news2/helper.php file, at about line 413, find following code:
$query = "SELECT `id`, `title`, `description`, CASE WHEN CHAR_LENGTH(`alias`) THEN CONCAT_WS(":", `id`, `alias`) ELSE `id` END as `slug` FROM `#__categories` s WHERE published = 1 and section=" . ( int ) $sid . $where;
$db->setQuery ( $query, 0, $limit );
and change to:
$query = "SELECT `id`, `title`, `description`, CASE WHEN CHAR_LENGTH(`alias`) THEN CONCAT_WS(":", `id`, `alias`) ELSE `id` END as `slug` FROM `#__categories` s WHERE published = 1 and section=" . ( int ) $sid . $where;$query .= " ORDER BY s.ordering ASC"; //$query .= " ORDER BY s.id ASC";
$db->setQuery ( $query, 0, $limit );
</blockquote>Ok! This code is ok!
Greg Banig FriendGreg Banig
- Join date:
- September 2014
- Posts:
- 41
- Downloads:
- 0
- Uploads:
- 5
- Thanks:
- 13
- Thanked:
- 2 times in 1 posts
November 17, 2009 at 8:12 am #331503Thanks. That solved what I was looking for. The code that needed replaced was actually line #553 and…
$query = “SELECT `id`, `title`, `description`, CASE WHEN CHAR_LENGTH(`alias`) THEN CONCAT_WS(“:”, `id`, `alias`) ELSE `id` END as `slug` FROM `#__categories` s WHERE published = 1 and section=”.(int)$sid.$where;
February 4, 2010 at 7:34 am #331506<em>@gregbanig 163437 wrote:</em><blockquote>Thanks. That solved what I was looking for. The code that needed replaced was actually line #553 and…
$query = “SELECT `id`, `title`, `description`, CASE WHEN CHAR_LENGTH(`alias`) THEN CONCAT_WS(“:”, `id`, `alias`) ELSE `id` END as `slug` FROM `#__categories` s WHERE published = 1 and section=”.(int)$sid.$where;</blockquote>
OK but what about if I want to show some of the categories from more then threemadeline63 Friendmadeline63
- Join date:
- January 2010
- Posts:
- 92
- Downloads:
- 0
- Uploads:
- 30
- Thanks:
- 11
- Thanked:
- 1 times in 1 posts
March 29, 2010 at 2:27 pm #338272HI,
I am trying to show my section by using ja news2, but not only at frontpage
i am using JA teline III.
thanks
Saguaros ModeratorSaguaros
- Join date:
- September 2014
- Posts:
- 31405
- Downloads:
- 237
- Uploads:
- 471
- Thanks:
- 845
- Thanked:
- 5346 times in 4964 posts
March 30, 2010 at 6:48 am #338384Dear madeline63!
Please read this forum
http://www.joomlart.com/forums/showpost.php?p=172160&postcount=11
madeline63 Friendmadeline63
- Join date:
- January 2010
- Posts:
- 92
- Downloads:
- 0
- Uploads:
- 30
- Thanks:
- 11
- Thanked:
- 1 times in 1 posts
March 30, 2010 at 11:22 am #338424hi, J.O.O.M staff
thanks for your quick reply,
do your have any suggestion for this? any module can make this?
Saguaros ModeratorSaguaros
- Join date:
- September 2014
- Posts:
- 31405
- Downloads:
- 237
- Uploads:
- 471
- Thanks:
- 845
- Thanked:
- 5346 times in 4964 posts
April 2, 2010 at 9:17 am #338874Dear madeline63!
I am sorry for not being of much help in this case. i do not know the module you need in where 🙁
April 12, 2010 at 5:40 pm #340108hi,
this will help re-order the categories inside sections on janews2. but how do we re-order the sections?
thank you
Saguaros ModeratorSaguaros
- Join date:
- September 2014
- Posts:
- 31405
- Downloads:
- 237
- Uploads:
- 471
- Thanks:
- 845
- Thanked:
- 5346 times in 4964 posts
April 13, 2010 at 4:30 am #340173Dear fmedia!
Please access the configuration of the ja news 2 module, you re-order Section IDs in the “Section Ids” Parameter
Example:
Original:
13:red
14:orange
8:deepblue
12:cyan
5:green
9:pink
11:lime
6change order of sections:
5:green
9:pink
13:red
14:orange
8:deepblue
11:lime
6
12:cyanGood luck
guap Friendguap
- Join date:
- March 2008
- Posts:
- 408
- Downloads:
- 16
- Uploads:
- 109
- Thanks:
- 99
- Thanked:
- 8 times in 2 posts
August 6, 2010 at 8:56 pm #351891<em>@gregbanig 163433 wrote:</em><blockquote>I am using JA News 2 in the JA Teline III template.
How can I control the display order of the categories? I have a Section with three Categories.
1) Category 1 = “Southern”
2) Category 2 = “Central”
3) Category 3 = “Northern”I would like them to display in JA News 2 in this order.
However, the Categories are displayed Northern, Southern, Central.</blockquote>
I go the category manager and use the “arrow” to arrange in order. It works for me.
-
AuthorPosts
This topic contains 12 replies, has 8 voices, and was last updated by guap 14 years, 4 months ago.
We moved to new unified forum. Please post all new support queries in our New Forum