-
AuthorPosts
-
spektra Friend
spektra
- Join date:
- October 2008
- Posts:
- 19
- Downloads:
- 0
- Uploads:
- 0
- Thanks:
- 4
- Thanked:
- 1 times in 1 posts
November 25, 2008 at 6:25 pm #135690Hello all,
i’d like to use the module title style – so that it appears half coloured, half gray – in my left menu.i saw that i need for it that my html will result so: <h3><a href=”link”><span>firstword</span> secondword</a></h3>.
i found this code in the modules.php
<?php if ($module->showtitle != 0) : ?>
<h3><span><?php echo $module->title; ?></span></h3>
<?php endif; ?>
<?php echo $module->content; ?>that should do the trick in the modules, but still i dont know how to bring it in the php menu page, and didn’t understand how the title is splitted up and goes over the </span> tag.
thanks…and sorry for my english… 🙂
Andrea
Sherlock FriendSherlock
- Join date:
- September 2014
- Posts:
- 11453
- Downloads:
- 0
- Uploads:
- 88
- Thanks:
- 221
- Thanked:
- 2478 times in 2162 posts
November 27, 2008 at 9:33 am #280483Dear !
Please open ja.script.js file in templatesjamesolitejs folder, go to line 112 :
//Add span to module title
function addSpanToTitle () {
//var colobj = document.getElementById ('ja-col');
//if (!colobj) return;
var modules = getElementsByClass ('module.*', null, "div");
if (!modules) return;
for (var i=0; i<modules.length; i++) {
var module = modules;
var title = module.getElementsByTagName ("h3")[0];
if (title) {
text = title.innerHTML;
var pos = text.indexOf(' ');
if (pos!=-1) {
title.innerHTML = "<span>"+text.substr(0,pos)+"</span>"+text.substr(pos);
}else{
title.innerHTML = "<span>"+text+"</span>";
}
}
}
}
this is function for split title of module.1 user says Thank You to Sherlock for this useful post
spektra Friendspektra
- Join date:
- October 2008
- Posts:
- 19
- Downloads:
- 0
- Uploads:
- 0
- Thanks:
- 4
- Thanked:
- 1 times in 1 posts
November 27, 2008 at 11:35 am #280498Thanks hainn84.
but my js understanding is not such good…
i tried to copy another time this code and then change the line
var modules = getElementsByClass ('module.*', null, "div");
to
var modules = getElementsByClass ('menu.*', null, "li");
but obviously didnt work. do you have some tips?Sherlock FriendSherlock
- Join date:
- September 2014
- Posts:
- 11453
- Downloads:
- 0
- Uploads:
- 88
- Thanks:
- 221
- Thanked:
- 2478 times in 2162 posts
November 28, 2008 at 7:09 am #280601sorry spektra , but html code of menu and module title is different, i still can’t help you in this case.
Sherlock FriendSherlock
- Join date:
- September 2014
- Posts:
- 11453
- Downloads:
- 0
- Uploads:
- 88
- Thanks:
- 221
- Thanked:
- 2478 times in 2162 posts
November 29, 2008 at 2:29 am #280701Hi spektra !
I have got the problem , you don’t need change javascript code , Please go to admin >> extensions >> module manager >> select menu module
On right panel , you change module class suffix of it from “_menuhilite” to “_menu” . -
AuthorPosts
This topic contains 6 replies, has 2 voices, and was last updated by spektra 15 years, 11 months ago.
We moved to new unified forum. Please post all new support queries in our New Forum