This is an old revision of the document!


Module

Implementieren von FE Anwender-CSS/JS in ein Module

Um in der Frontenausgabe CSS oder JS Dateien (Im Headbereich) in das Modul zu bringen kannst du folgendes Schnipsen zum deinem Code hinzufügen.


Docu:
Forum: How to include custom CSS in module

Autor: breitsch http://web.casa-loca.com/
CMS-Version: >= V1.3.0
Version:(2009/02/21)
Update:

Condition:/config/phpwcms/conf.inc.php

  • $phpwcms['allow_ext_init'] = 1;
  • $phpwcms['allow_ext_render'] = 1;
  • $phpwcms['allow_cntPHP_rt'] = 1;



// load js functions
$block['custom_htmlhead']['javascript.js'] = '  <script src="'.$phpwcms['modules'][$crow['acontent_module']]['dir'].'template/js/javascript.js" type="text/javascript"></script>';
  //load inline css
$block['custom_htmlhead']['inlinecss.css'] ='<style type="text/css">'.LF.'  .classname  {property:value;}'.LF.'</style>';
  //load external style sheet
$GLOBALS['block']['custom_htmlhead']['externalcss.css'] = LF.'  <style type="text/css">'.LF.'@import url("'.$phpwcms['modules'][$crow['acontent_module']]['dir'].'template/css/externalcss.css");'.LF.'</style>';

Der letzte Schlüssel der Arrays $block muss einzigartig sein!

Implementieren von FE Anwender-JS in ein Module

$BE['HEADER'][] = getJavaScriptSourceLink('include/inc_js/optionselect.js');
deutsch/technik/module.1283066869.txt.gz · Last modified: 2018/06/03 18:06 (external edit)
www.planmatrix.de www.chimeric.de Creative Commons License Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0