NAVIGATION
This shows you the differences between two versions of the page.
|
deutsch:technik:aufruf-interner-funktionen:skript-in-den-head-bereich [2011/04/02 16:38] Knut Heermann (flip-flop) |
deutsch:technik:aufruf-interner-funktionen:skript-in-den-head-bereich [2018/06/03 18:08] (current) |
||
|---|---|---|---|
| Line 63: | Line 63: | ||
| \\ | \\ | ||
| - | **Ab phpwcms r411:** | + | **Sonderfall CSS-Datei in /template/inc_css/*** |
| + | |||
| + | Hierzu gibt es ein eigenes Array ['block']['css'], das direkt das Verzeichnis /template/inc_css/* ansteuert. \\ | ||
| + | Bsp.: | ||
| + | <code php> | ||
| + | $GLOBALS['block']['css']['reg_tabs_accordion01_login'] = 'specific/reg_tabs_accordion01_login.css'; | ||
| + | </code> | ||
| + | |||
| + | |||
| + | \\ | ||
| + | ==== Ab phpwcms r411: ==== | ||
| Forum: [[http://forum.phpwcms.org/viewtopic.php?p=127961#p127961|…and some more too]] | Forum: [[http://forum.phpwcms.org/viewtopic.php?p=127961#p127961|…and some more too]] | ||
| + | |||
| + | <note important> | ||
| + | **Notation:** %%<!--%%##%% %%##%%[CSS:|JS:]%%##%% %%##Anweisung##%% %%##%%-->%% | ||
| + | |||
| + | Die gekennzeichneten Leerzeichen##%% %%## sind zwingend!! | ||
| + | </note> | ||
| + | |||
| + | === CSS: === | ||
| + | |||
| <code css> | <code css> | ||
| - | <!--CSS: | + | <!-- CSS: {TEMPLATE}inc_css/my.css --> |
| - | #header { | + | |
| - | background: #F9E931 url(template/img/mozilla.png) no-repeat left top !important; | + | |
| - | background: #F9E931 url(template/img/mozilla.png) no-repeat left top; | + | |
| - | } | + | |
| - | --> | + | |
| </code> | </code> | ||
| + | \\ | ||
| + | - Als Inline CSS: | ||
| + | <code css> | ||
| + | <!-- CSS: body {background:yellow;} --> | ||
| + | <!-- CSS: | ||
| + | body { | ||
| + | background:yellow; | ||
| + | } | ||
| + | a { | ||
| + | text-decoration: none; | ||
| + | background: transparent url({TEMPLATE}img/link.png) no-repeat left center; | ||
| + | padding-left: 25px; | ||
| + | } | ||
| + | --> | ||
| + | </code> | ||
| \\ | \\ | ||
| - | **Sonderfall CSS-Datei in /template/inc_css/*** | ||
| - | Hierzu gibt es ein eigenes Array ['block']['css'], das direkt das Verzeichnis /template/inc_css/* ansteuert. \\ | + | === JavaScript: === |
| - | Bsp.: | + | Aktuell im Sitetemplate ausgewählte (aber nicht standardmäßig zu laden aktivierte) js-libary starten: |
| - | <code php> | + | <code html> |
| - | $GLOBALS['block']['css']['reg_tabs_accordion01_login'] = 'specific/reg_tabs_accordion01_login.css'; | + | <!-- JS: initJSLib --> |
| + | </code> | ||
| + | \\ | ||
| + | - andere JS-Dateine einbinden | ||
| + | <code html> | ||
| + | <!-- JS: {TEMPLATE}inc_js/calendarDateInput/calendarDateInputX.js --> | ||
| + | <!-- JS: {TEMPLATE}inc_js/MyFolder/MyScript.js --> | ||
| </code> | </code> | ||
| \\ | \\ | ||
| + | - Plugins einbinden (jQuery) z.B. mit den Dateien in: | ||
| + | * template/lib/jquery/plugin/ui-1.8.custom.min.js | ||
| + | * template/lib/jquery/plugin/jquery.easing.min.js | ||
| - | **Ab phpwcms r411:** | + | <code html> |
| - | <code css> | + | <!-- JS: ui-1.8.custom.min --> |
| - | <!-- CSS: {TEMPLATE}inc_css/my.css --> | + | <!-- JS: easing.min --> |
| + | </code> | ||
| + | |||
| + | \\ | ||
| + | Analog dazu für MooTools : | ||
| + | |||
| + | - Plugins einbinden z.B. MooTools 1.2x mit den Dateien in: | ||
| + | * template/lib/mootools/plugin-1.2/mootools.flext.js | ||
| + | * template/lib/mootools/plugin-1.2/mootools.Quickie-yui.js | ||
| + | |||
| + | <code html> | ||
| + | <!-- JS: flext --> | ||
| + | <!-- JS: Quickie-yui --> | ||
| + | </code> | ||
| + | |||
| + | \\ | ||
| + | - Laden von More Komponenten: | ||
| + | |||
| + | <code html> | ||
| + | <!-- JS: myplugin --> | ||
| + | <!-- JS: MORE:Fx/Fx.Elements,Fx/Fx.Accordion --> | ||
| + | </code> | ||
| + | \\ | ||
| + | |||
| + | - Mehrzeiliges JavaScript als <script /> im "head" Bereich. | ||
| + | |||
| + | Alle gleichen JavaScript-Abschnitt wie in sich wiederholenden ContentParts einmal gerendert. \\ | ||
| + | Um als JavaScript erkannt zu werden brauchen wir ##%%;%%##, ##%%//%%## und/oder ##%%/*%%##.\\ | ||
| + | Der Abschluss einer JavaScript Zeile mit einem ##%%;%%## ist der sicherste Weg: | ||
| + | |||
| + | <code html> | ||
| + | <!-- JS: | ||
| + | // My Custom JS | ||
| + | alert('hey dude it works as expected'); | ||
| + | --> | ||
| </code> | </code> | ||