test
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • spektra Friend
    #135690

    Hello 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 Friend
    #280483

    Dear !
    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.

    spektra Friend
    #280498

    Thanks 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 Friend
    #280601

    sorry spektra , but html code of menu and module title is different, i still can’t help you in this case.

    Sherlock Friend
    #280701

    Hi 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” .

    spektra Friend
    #280717

    Hi hainn 84!
    That is changing my menu module title, but not the menu links…i thought it was an easy change, but it doesnt seem so.

    thanks anyway

Viewing 6 posts - 1 through 6 (of 6 total)

This topic contains 6 replies, has 2 voices, and was last updated by  spektra 16 years ago.

We moved to new unified forum. Please post all new support queries in our New Forum