Jump to content

CSS isn't loaded on my application.


Siper

Recommended Posts

I looked on the documentation and I see CSSes should be loaded automaticly when I'm add them into /myapp/dev/css folder. But it doesn't working.

For Example, I've and widget called 'shoutbox' with:

  • php widget file on /myapp/widgets/shoutbox.php:
    <?php
    
    namespace IPS\myapp\widgets;
    
    /* To prevent PHP errors (extending class does not exist) revealing path */
    if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
    {
    	header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
    	exit;
    }
    
    class _shoutbox extends \IPS\Widget
    {
    	public $key = 'shoutbox';
    	public $app = 'myapp';
    	public $plugin = '';
    	public function render()
    	{
    		return $this->output("My Data");
    	}
    }
    
  • Simple CSS on /myapp/dev/css/front/widget/shoutbox.css
    #shoutboxWrapper {
    	background: #f00;	
    }
  • phtml on /myapp/dev/html/front/widgets/shoutbox.phtml
    <ips:template parameters="$mydata" />
    <div id="shoutboxWrapper">
        <h1>Hello World</h1>
    </div>

     

And thats all, my widget template are showing correcly, but without CSS. With modules are that same issue. What's wrong am I doing?

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...