-
AuthorPosts
-
viet4777 Friend
viet4777
- Join date:
- August 2006
- Posts:
- 17
- Downloads:
- 4
- Uploads:
- 1
- Thanks:
- 3
- Thanked:
- 1 times in 1 posts
August 28, 2010 at 3:20 pm #153890I try to load scripts and stylesheet for a component such as below:
[PHP]<?php
/**
* @version 1.0.0 smoothgallery $
* @package smoothgallery
* @copyright Copyright © 2010 – All rights reserved.
* @license GNU/GPL
* @author
* @author mail nobody@nobody.com
*
*
* @MVC architecture generated by MVC generator tool at http://www.alphaplug.com
*/// no direct access
defined(‘_JEXEC’) or die(‘Restricted access’);jimport( ‘joomla.application.component.model’ );
class smoothgalleryModelSmoothgallery extends Jmodel
{
function __construct(){
parent::__construct();
JHTML::stylesheet(‘layout.css’,’com_smoothgallery/assets/css/’);
JHTML::stylesheet(‘jd.gallery.css’,’com_smoothgallery/assets/css/’);
JHTML::script(‘jd.gallery.js’,’com_smoothgallery/assets/scripts/’);
JHTML::script(‘jd.gallery.transitions.js’,’com_smoothgallery/assets/scripts/’);
}}
?>[/PHP]But Only scripts are rendered. No stylesheets are output: (layout.css and jd.gallery.css are mising)
[PHP]transitional.dtd”><html xmlns=”http://www.w3.org/1999/xhtml” xml:lang=”en-gb” lang=”en-gb”>
<head>
<meta http-equiv=”content-type” content=”text/html; charset=utf-8″ />
<meta name=”robots” content=”index, follow” />
<meta name=”keywords” content=”joomla, Joomla” />
<meta name=”description” content=”Joomla! – the dynamic portal engine and content management system” />
<meta name=”generator” content=”Joomla! 1.5 – Open Source Content Management” />
<title>Smooth Gallery</title>
<link rel=”stylesheet” href=”/cc/templates/system/css/system.css” type=”text/css” />
<link rel=”stylesheet” href=”/cc/templates/system/css/general.css” type=”text/css” />
<link rel=”stylesheet” href=”/cc/plugins/system/jat3/base-themes/default/css/addons.css” type=”text/css” />
<link rel=”stylesheet” href=”/cc/plugins/system/jat3/base-themes/default/css/layout.css” type=”text/css” />
<link rel=”stylesheet” href=”/cc/plugins/system/jat3/base-themes/default/css/template.css” type=”text/css” />
<link rel=”stylesheet” href=”/cc/plugins/system/jat3/base-themes/default/css/usertools.css” type=”text/css” />
<link rel=”stylesheet” href=”/cc/plugins/system/jat3/base-themes/default/css/css3.css” type=”text/css” />
<link rel=”stylesheet” href=”/cc/plugins/system/jat3/base-themes/default/css/menu/mega.css” type=”text/css” />
<link rel=”stylesheet” href=”/cc/templates/ja_t3_blank/css/template.css” type=”text/css” />
<link rel=”stylesheet” href=”/cc/templates/ja_t3_blank/css/menu/mega.css” type=”text/css” />
<script type=”text/javascript” src=”/cc/media/system/js/mootools.js”></script>
<script type=”text/javascript” src=”/cc/plugins/system/jat3/base-themes/default//js/core.js”></script>
<script type=”text/javascript” src=”/cc/plugins/system/jat3/base-themes/default//js/menu/mega.js”></script>
<script type=”text/javascript” src=”/cc/com_smoothgallery/assets/scripts/jd.gallery.js”></script>
<script type=”text/javascript” src=”/cc/com_smoothgallery/assets/scripts/jd.gallery.transitions.js”></script> [/PHP]If I use a defult template. Both stylesheets and scripts are rendered:
[PHP]<html xmlns=”http://www.w3.org/1999/xhtml” xml:lang=”en-gb” lang=”en-gb”><head>
<meta http-equiv=”content-type” content=”text/html; charset=utf-8″ />
<meta name=”robots” content=”index, follow” />
<meta name=”keywords” content=”joomla, Joomla” />
<meta name=”description” content=”Joomla! – the dynamic portal engine and content management system” />
<meta name=”generator” content=”Joomla! 1.5 – Open Source Content Management” />
<title>Smooth Gallery</title>
<link href=”/cc/templates/ja_purity/favicon.ico” rel=”shortcut icon” type=”image/x-icon” />
<link rel=”stylesheet” href=”/cc/com_smoothgallery/assets/css/layout.css” type=”text/css” />
<link rel=”stylesheet” href=”/cc/com_smoothgallery/assets/css/jd.gallery.css” type=”text/css” />
<script type=”text/javascript” src=”/cc/media/system/js/mootools.js”></script></script>
<script type=”text/javascript” src=”/cc/com_smoothgallery/assets/scripts/jd.gallery.js”></script>
<script type=”text/javascript” src=”/cc/com_smoothgallery/assets/scripts/jd.gallery.transitions.js”></script><link rel=”stylesheet” href=”http://localhost:8080/cc/templates/system/css/system.css” type=”text/css” />
<link rel=”stylesheet” href=”http://localhost:8080/cc/templates/system/css/general.css” type=”text/css” />
<link rel=”stylesheet” href=”http://localhost:8080/cc/templates/ja_purity/css/template.css” type=”text/css” /><script language=”javascript” type=”text/javascript” src=”http://localhost:8080/cc/templates/ja_purity/js/ja.script.js”></script>
<script language=”javascript” type=”text/javascript”>
var rightCollapseDefault=’show’;
var excludeModules=’38’;
</script>
<script language=”javascript” type=”text/javascript” src=”http://localhost:8080/cc/templates/ja_purity/js/ja.rightcol.js”></script><link rel=”stylesheet” href=”http://localhost:8080/cc/templates/ja_purity/css/menu.css” type=”text/css” />
<link rel=”stylesheet” href=”http://localhost:8080/cc/templates/ja_purity/styles/background/lighter/style.css” type=”text/css” />
<link rel=”stylesheet” href=”http://localhost:8080/cc/templates/ja_purity/styles/elements/black/style.css” type=”text/css” />[/PHP]How to fix problem.
Thanks.
August 30, 2010 at 12:59 am #354063Help, anyone? I am trying to load the Gavick News Image slider, but the stylesheet simply wont get loaded… What causes this?
Saguaros ModeratorSaguaros
- Join date:
- September 2014
- Posts:
- 31405
- Downloads:
- 237
- Uploads:
- 471
- Thanks:
- 845
- Thanked:
- 5346 times in 4964 posts
korb Friendkorb
- Join date:
- March 2008
- Posts:
- 315
- Downloads:
- 0
- Uploads:
- 0
- Thanks:
- 40
- Thanked:
- 48 times in 39 posts
August 30, 2010 at 9:08 am #354116IE6/7 limits to 30 CSS files, in other cases, the module is not working properly, or it is not even loaded. Please try to enable the option Optimize CSS in template manager, Global tab to check if it works.
1 user says Thank You to korb for this useful post
August 30, 2010 at 1:18 pm #354137Not using ie, this is in FF.
The module loads I know because it shows and works, just doesn’t have it’s styles loaded.I acttally have to disable the optimization for that to work as I get js errors otherwise.
viet4777 Friendviet4777
- Join date:
- August 2006
- Posts:
- 17
- Downloads:
- 4
- Uploads:
- 1
- Thanks:
- 3
- Thanked:
- 1 times in 1 posts
August 30, 2010 at 4:57 pm #354153Thank.
This is a mistake, after I tracking the $document->_styleSheets ($document =& JFactory::getDocument(); at jat3/core/head.php). I found that I forget declare the right filename:
JHTML::stylesheet(‘layout.css’,’com_smoothgallery/assets/css/’);
It should be JHTML::stylesheet(‘layout.css’,’components/com_smoothgallery/assets/css/’);Everything is oK now.
<em>@tienhc 192145 wrote:</em><blockquote>Hello all! our developers are checking the issue, please give us some time for doing this
Thanks</blockquote> -
AuthorPosts
This topic contains 7 replies, has 4 voices, and was last updated by thatryan 14 years, 2 months ago.
We moved to new unified forum. Please post all new support queries in our New Forum