Page 2 of 2

Re: Load diff css / js files for plugin or module based on l

Posted: Sun Dec 22, 2013 1:22 pm
by jiyuu19th
thank a lot but it not work for me :'(
triveni1231 wrote:I want to add few custom fonts.

Triveni
you can use font face css in your site.

Re: Load diff css / js files for plugin or module based on l

Posted: Wed Feb 26, 2014 4:06 am
by yohebon
pishro wrote:how i can add custom fonts language, CSS and JavaScript files to my template based on the Warp Framework ?
I had the same question. You can search for an answer here:

Code: Select all

http://www.yootheme.com/themes/documentation/customizing/add-new-css-js-or-fonts

Re: Load diff css / js files for plugin or module based on l

Posted: Sun May 25, 2014 9:30 am
by bolobolojogja
jdran wrote:Well, I tried but I couldn't find a solution.

This is the code:

Code: Select all

<?php
defined('_JEXEC') or die;
$app = JFactory::getApplication();
//get params
$tagline = $this->params->get('sitedescription');
JFactory::getDocument()->setGenerator('');
$lang = JFactory::getLanguage();
if ($lang->getTag() == 'el-GR') {
  JHtml::_('stylesheet', 'tdg/css/mySecondcss.css', array(), true);
}
  
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $this->language; ?>" lang="<?php echo $this->language; ?>" >
<head>
<jdoc:include type="head" />
<link rel="stylesheet" href="<?php echo $this->baseurl ?>/templates/system/css/system.css" type="text/css" />
<link rel="stylesheet" href="<?php echo $this->baseurl ?>/templates/system/css/general.css" type="text/css" />
<link rel="stylesheet" href="<?php echo $this->baseurl ?>/templates/<?php echo $this->template ?>/css/cleanstickyfooter.css" type="text/css" />
<link rel="stylesheet" href="<?php echo $this->baseurl ?>/templates/<?php echo $this->template ?>/css/default.css" type="text/css" />
</head>

<body>
    <div class="header">
      <div class="logo">
         <a href="index.php" title="Logo">
            <img class="badge" src="<?php echo $this->baseurl ?>/templates/<?php echo $this->template ?>/images/logo.png" width="100px" height="100px" title="logo" alt="The logo" />
         </a>
            <div class="spec">
          
               <div class="sitename">
                  <?php echo $app->getCfg('sitename');?>
               </div><!--/sitename-->
      
               <div class='tagline'>
                 <?php echo $tagline; ?>
               </div><!--/tagline-->
            </div><!--/spec-->
      </div><!--/logo-->
       
  </div><!--/header-->
What I wanted to do is to have a different css in each language for the <spec> and only. That's why I asked what do I have to put after "else".
The problem is that I don't know how to substitute the "default.css" for the case that Greek language is turned on. I even tried different forms of the code JHTML::_ but it didn't seem to trigger anything.
wweewww....it's very very nice...and very absolutely..i hope the code can put on my web..thank yout