Template issue - Joomla! Forum - community, help and support


hello all,

i not sure if here @ right spot, if not sorry :)

i trying 2 color text on module of site

you can see here first text red white original website

here see white, , cannot seem find out can change this. test website


does has clue?

danny

i had similar on recent project
this code found on net works fine...

templates > template_folder > html > modules.php
add following function

code: select all

function spanreplace($title){
  $title = "<span>" . $title;
  $space = strpos($title," ");
  if($space){
    $title = substr($title, 0, $space) . "</span>" . substr($title, $space);
  }else{
    $title .= "";
  }
  return $title;
}

and style definition this

code: select all

function modchrome_dualcolors( $module, &$params, &$attribs ) {
  echo '<div class="box">';
  if ($module->showtitle)
  {
    echo '<h2>' . spanreplace($module->title) . '</h2>';
  }
  echo $module->content;
  echo '</div>';
}

next define css in template.css

code: select all

h2 span {color:#cc0000}

finally add style module position in index.php

code: select all

<jdoc:include type="modules" name="box" style="dualcolors" />


if m not mistaken, there plugin enabled add tags in module title, m not sure if new versions supported or not

....however, know if theres other way achieve this.





Comments

Popular posts from this blog

How to change text Component easybook reloaded *newbee* - Joomla! Forum - community, help and support

After Effect warning: A problem occurred when processing OpenGL commands

Preconditions Failed. - Joomla! Forum - community, help and support