-
AuthorPosts
-
fanho Friend
fanho
- Join date:
- September 2008
- Posts:
- 42
- Downloads:
- 6
- Uploads:
- 1
- Thanks:
- 13
- Thanked:
- 4 times in 1 posts
October 14, 2008 at 1:12 pm #134397Ja Helio as many other templates has diferent color options for the navigation bar, titles and elements. This is great but I’m surprised that only JA Teline II uses those colors shemes as part of the navigation of the site. Where every main division of the site can have a color asigned.
I think it’s agreat visual way to organize the content of the site by colors.So my question is:
Is there a way to use the colors sheme of JA Helio and make them match the main menu items exemple : (Item0 : red / item1 : blue / item2 : green / item3 : orange / ….) ?I know it might sound a lot to ask but I’m pretty sure it’s possible. 🙂
Stephane
Sherlock FriendSherlock
- Join date:
- September 2014
- Posts:
- 11453
- Downloads:
- 0
- Uploads:
- 88
- Thanks:
- 221
- Thanked:
- 2478 times in 2162 posts
October 20, 2008 at 8:11 am #276208Hi
each menu have one id css for it.
you can create css for it
Example menu A have Itemid is 50,
you can create css for that menu:
#menu50 {—add your css here
}Sherlock FriendSherlock
- Join date:
- September 2014
- Posts:
- 11453
- Downloads:
- 0
- Uploads:
- 88
- Thanks:
- 221
- Thanked:
- 2478 times in 2162 posts
October 20, 2008 at 8:11 am #276209Hi
each menu have one id css for it.
you can create css for it
Example menu A have Itemid is 50,
you can create css for that menu:
#menu50 {—add your css here
}fanho Friendfanho
- Join date:
- September 2008
- Posts:
- 42
- Downloads:
- 6
- Uploads:
- 1
- Thanks:
- 13
- Thanked:
- 4 times in 1 posts
October 20, 2008 at 8:18 am #276213Thanks for your help nguoiabcd !
But I understand this much. 🙂
The problem is that this won’t allow me to change other design elements of the page depending on wich part of the site the user is navigating.
If my first color is red for exemple, I can’t control the breadcrumb background or heading font color by using item40. Or can I ?????Stephane
Sherlock FriendSherlock
- Join date:
- September 2014
- Posts:
- 11453
- Downloads:
- 0
- Uploads:
- 88
- Thanks:
- 221
- Thanked:
- 2478 times in 2162 posts
October 20, 2008 at 8:28 am #276215You can do so by the following way:
1. create css for each menu and theme, example red.css, blue.css,…
2. Edit index.php(templates/ja_helio folder), you can add code like this:
<?php
if ($Itemid==1) {
$color=="red";
}
if ($Itemid==2) {
$color=="blue";
}
....
?>
<link href="<?php echo $tmpTools->templateurl();?>/css/<?php echo $color;?>.css" rel="stylesheet" type="text/css" />1 user says Thank You to Sherlock for this useful post
fanho Friendfanho
- Join date:
- September 2008
- Posts:
- 42
- Downloads:
- 6
- Uploads:
- 1
- Thanks:
- 13
- Thanked:
- 4 times in 1 posts
October 20, 2008 at 8:35 am #276222Thanks a lot this looks more like what I need.
I’m gone try it and I’ll let you know how it goes.Stephane
fanho Friendfanho
- Join date:
- September 2008
- Posts:
- 42
- Downloads:
- 6
- Uploads:
- 1
- Thanks:
- 13
- Thanked:
- 4 times in 1 posts
October 20, 2008 at 8:57 am #276228Doesn’t work so far :confused:
In index.php I replaced the original line that get the selected color from param.ini:
<link href="<?php echo $tmpTools->templateurl(); ?>/css/colors/<?php echo $tmpTools->getParam(JA_TOOL_COLOR); ?>.css" rel="stylesheet" type="text/css" />
And I replaced it by this lines of code:
<?php
if ($Itemid==1) {
$color=="red";
}
if ($Itemid==2) {
$color=="green";
}
if ($Itemid==3) {
$color=="orange";
}
if ($Itemid==4) {
$color=="default";
}
?>
<link href="<?php echo $tmpTools->templateurl();?>/css/colors/<?php echo $color;?>.css" rel="stylesheet" type="text/css" />But it doesn’t seem to change anything. Inside CSS folder, I have a colors folder with red.css, default.css, green.css and orange.css
Also, this is the info I got from the buttons: a #menu11 .menu-item3. Am I supposed to use the 11 or the 3 ? I tried both but didn’t work.
Stephane
Sherlock FriendSherlock
- Join date:
- September 2014
- Posts:
- 11453
- Downloads:
- 0
- Uploads:
- 88
- Thanks:
- 221
- Thanked:
- 2478 times in 2162 posts
October 20, 2008 at 9:18 am #276236Hi
I only have idea, you must create by your self
you must replace 1,2… by Itemid of each menu and you must have code to get $temid from Itemidfanho Friendfanho
- Join date:
- September 2008
- Posts:
- 42
- Downloads:
- 6
- Uploads:
- 1
- Thanks:
- 13
- Thanked:
- 4 times in 1 posts
October 20, 2008 at 9:30 am #276243Yes that’s what I thought, it can’t work if the Itemid isn’t extract first.
Thanks for trying.Anybody have an idea how to extract the current item ID with PHP ????
Sherlock FriendSherlock
- Join date:
- September 2014
- Posts:
- 11453
- Downloads:
- 0
- Uploads:
- 88
- Thanks:
- 221
- Thanked:
- 2478 times in 2162 posts
October 20, 2008 at 9:38 am #276244you can try
$Itemid = $_REQUEST['Itemid'];
fanho Friendfanho
- Join date:
- September 2008
- Posts:
- 42
- Downloads:
- 6
- Uploads:
- 1
- Thanks:
- 13
- Thanked:
- 4 times in 1 posts
October 20, 2008 at 10:26 am #276252Thanks but doesn’t seem to work :((
I wish I knew more PHP…Stephane
Sherlock FriendSherlock
- Join date:
- September 2014
- Posts:
- 11453
- Downloads:
- 0
- Uploads:
- 88
- Thanks:
- 221
- Thanked:
- 2478 times in 2162 posts
October 21, 2008 at 9:14 am #276412you can try :
$Itemid=JRequest::getCmd('Itemid');
fanho Friendfanho
- Join date:
- September 2008
- Posts:
- 42
- Downloads:
- 6
- Uploads:
- 1
- Thanks:
- 13
- Thanked:
- 4 times in 1 posts
October 21, 2008 at 9:27 am #276418Hello,
This didn’t work either.
Actually I’m not even sure of the rest of the code…When I try to give a direct value to $Itemid, like this :
<?php
$Itemid==7;
if ($Itemid==26) {
$color=="red";
}
if ($Itemid==7) {
$color=="green";
}
if ($Itemid==11) {
$color=="orange";
}
if ($Itemid==16) {
$color=="default";
}
?>
<link href="<?php echo $tmpTools->templateurl();?>/css/colors/<?php echo $color;?>.css" rel="stylesheet" type="text/css" />The Css file doesn’t load either. :((
Stephane
Sherlock FriendSherlock
- Join date:
- September 2014
- Posts:
- 11453
- Downloads:
- 0
- Uploads:
- 88
- Thanks:
- 221
- Thanked:
- 2478 times in 2162 posts
October 21, 2008 at 9:49 am #276423Hi,
Can you please PM me your site admin account as well as FPT account? Without investigating into the codes, I am afraid that we can not provide any solutionfanho Friendfanho
- Join date:
- September 2008
- Posts:
- 42
- Downloads:
- 6
- Uploads:
- 1
- Thanks:
- 13
- Thanked:
- 4 times in 1 posts
October 21, 2008 at 10:08 am #276429I’m developing on a local host right know. Using wamp server 2.0
I can put it online. Do you know what info I need to give you so that you can access the site ?I could put it online but this would take some time.
Stephane
-
AuthorPosts
This topic contains 24 replies, has 4 voices, and was last updated by Ninja Lead 14 years ago.
We moved to new unified forum. Please post all new support queries in our New Forum