-
AuthorPosts
-
emerich Friend
emerich
- Join date:
- August 2008
- Posts:
- 53
- Downloads:
- 10
- Uploads:
- 3
- Thanks:
- 16
- Thanked:
- 1 times in 1 posts
November 26, 2009 at 11:07 am #146374Hello guys,
i search all forum and i know where i can change the menu colors for other menu items, but where can i change the menu color for a HOME – frontpage?
Thanks for answerAnonymous ModeratorJA Developer
- Join date:
- September 2014
- Posts:
- 9914
- Downloads:
- 207
- Uploads:
- 152
- Thanks:
- 1789
- Thanked:
- 2008 times in 1700 posts
December 1, 2009 at 9:13 am #325358Hi emerich
Please open templatesja_teline_iiilibsja.template.helper.php file, find following code section:
function getThemeForSection () {
//get the most parent menu id
$query = "select params from #__modules where `module`='mod_janews2'";
$database =& JFactory::getDBO();
$database->setQuery($query);
$params = new JParameter($database->loadResult());
$sections = $params->get('sections', '');
if (!$sections) return '';global $Itemid;
$mid = $Itemid;
$pid = $mid;
$menu = &JSite::getMenu();if(!$menu) return;
while ($pid) {
$mid = $pid;
$pmenu = $menu->getItem($mid);
$pid = $pmenu?$pmenu->parent:0;
}
//Get menu item
$menuitem = $menu->getItem($mid);
//parse link
$urls = parse_url($menuitem->link);
$querystring = $urls['query'];
$output = null;
parse_str ($querystring,$output);
$sectionid = 0;
if($output['view']=='section'){
$sectionid = $output['id'];
}
else if($output['view']=='category'){
$catid = $output['id'];
$sectionid = $this->getSectionId($catid);
}if($sectionid) {
$sectionids = preg_split('/[n,]|<br />/', $sections);
for ($i = 0; $i < count($sectionids); $i++) {
$temp = split(':',$sectionids[$i]);
if(isset($temp[0]) && $temp[0]==$sectionid) {
return isset($temp[1])? '-'.trim($temp[1]):'';
}
}
}
return '';
}
find this text: return ” and change to return ‘-your_color’
example: your_color = red
1 user says Thank You to JA Developer for this useful post
December 25, 2009 at 4:28 am #327471Thank you! But i not change ok. Ple help i change color defau is red. Thank very much.
Samir Mastaliyev FriendSamir Mastaliyev
- Join date:
- April 2014
- Posts:
- 82
- Downloads:
- 0
- Uploads:
- 13
- Thanks:
- 18
- Thanked:
- 1 times in 1 posts
December 25, 2009 at 9:37 pm #327499Dear JA Developer
i also didn’t get that. i’ve changed the things as you show, but nothing changed. may be i’ve done something wrong. please , clarify (see attachment, which menu i’m going to change ,green to black)
Anonymous ModeratorJA Developer
- Join date:
- September 2014
- Posts:
- 9914
- Downloads:
- 207
- Uploads:
- 152
- Thanks:
- 1789
- Thanked:
- 2008 times in 1700 posts
December 28, 2009 at 8:42 am #327583Hi mastaliyev
My code is only for the frontpage.
For your image, you have to edit ja news 2 module, in Section IDs, you have to add a color for each Section ID. For full information, please check http://www.joomlart.com/forums/topic/ja-news-ii-modules-installation-guide/
Samir Mastaliyev FriendSamir Mastaliyev
- Join date:
- April 2014
- Posts:
- 82
- Downloads:
- 0
- Uploads:
- 13
- Thanks:
- 18
- Thanked:
- 1 times in 1 posts
December 28, 2009 at 8:57 am #327587thank you,found that!
emerich Friendemerich
- Join date:
- August 2008
- Posts:
- 53
- Downloads:
- 10
- Uploads:
- 3
- Thanks:
- 16
- Thanked:
- 1 times in 1 posts
January 5, 2010 at 8:26 am #328228thanks for answer, its working…
MERINEO
AuthorPostsViewing 7 posts - 1 through 7 (of 7 total)This topic contains 7 replies, has 4 voices, and was last updated by emerich 14 years, 10 months ago.
We moved to new unified forum. Please post all new support queries in our New Forum
Home – change menu color
Viewing 7 posts - 1 through 7 (of 7 total)