X-Git-Url: http://p2p-next.cs.pub.ro/gitweb/?a=blobdiff_plain;ds=inline;f=application%2Fcore%2FArticle_Controller.php;h=480b8473e24c80fc4cfdf6155e87775741fa543c;hb=954fc0210d9151cb86ca4dad6a955f59ba135915;hp=e6a50aa3d79f399cbf60adbbe1c9b83e879fdd1c;hpb=ccd5b90c2908b1ebd03810739df33a742c69e8a6;p=living-lab-site.git
diff --git a/application/core/Article_Controller.php b/application/core/Article_Controller.php
index e6a50aa..480b847 100644
--- a/application/core/Article_Controller.php
+++ b/application/core/Article_Controller.php
@@ -16,6 +16,11 @@
* an entry named "article_${method}_helpers" or "article_${method}_libraries"
* respectively with an array of helpers or libraries to be loaded for the
* article.
+ *
CSSs, JSs: in config file 'article.php':
+ * an entry named "article_${method}_css" or "article_${method}_js"
+ * respectively with an array of .css or .js to be loaded into members $css
+ * and $js. It's up to the programmer to define how this members are going
+ * to be used.
*
*
* @category Base Controller Library
@@ -27,6 +32,8 @@ class Article_Controller extends CI_Controller {
protected $metaDescription = NULL;
protected $helpers = array();
protected $libraries = array();
+ protected $css = array();
+ protected $js = array();
function __construct()
{
@@ -65,6 +72,16 @@ class Article_Controller extends CI_Controller {
$this->libraries = $this->config->item("article_${method}_library");
if ($this->libraries !== FALSE)
$this->load->library($libraries);
+
+ // CSSs
+ $css =& $this->config->item("article_${method}_css");
+ if ($css !== FALSE)
+ $this->css = $css;
+
+ // JavaScripts
+ $js =& $this->config->item("article_${method}_js");
+ if ($js !== FALSE)
+ $this->js = $js;
}
/**