Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Cookies in Templates
#2
Bei der TWLan ist es so, dass du für (ich glaube) jedes Template auch ne seperate PHP datei hast wo du deinen PHP Code reinschreiben kannst. Dort kannst du auch das Cookie setzen.

Eine Variable übergibst du dem Template mit der assign methode von Smarty.

Kleines Beispiel:
PHP Code:
<?php
// Einbisschen
// PHP
// Code
// Blabliblu
$randomVar 'I cant be more random...';

$smarty->assign('nameDerVariable'$randomVar);
?>

und die Variable benutzt du dann in der Template ganz einfach so:
Code:
{$nameDerVariable}
oder
Code:
{if $nameDerVariable == 'blabli'}Inhalt ist blabli{/if}
usw...

MfG
✝ RiP 
Weiter geht's  Cool
Reply


Messages In This Thread
Cookies in Templates - by 666 - 17.11.2014, 21:32
RE: Cookies in Templates - by Milu2K - 17.11.2014, 23:16
RE: Cookies in Templates - by 666 - 18.11.2014, 21:43
RE: Cookies in Templates - by Steffen - 18.11.2014, 21:57
RE: Cookies in Templates - by 666 - 19.11.2014, 00:36
RE: Cookies in Templates - by Milu2K - 19.11.2014, 08:04
RE: Cookies in Templates - by 666 - 19.11.2014, 12:44
RE: Cookies in Templates - by Oromis123456 - 19.11.2014, 14:16
RE: Cookies in Templates - by 666 - 19.11.2014, 14:49
RE: Cookies in Templates - by Steffen - 19.11.2014, 15:30
RE: Cookies in Templates - by 666 - 19.11.2014, 20:53
RE: Cookies in Templates - by Milu2K - 20.11.2014, 17:36
RE: Cookies in Templates - by 666 - 20.11.2014, 21:17
RE: Cookies in Templates - by Milu2K - 20.11.2014, 21:59
RE: Cookies in Templates - by 666 - 20.11.2014, 22:10
RE: Cookies in Templates - by Steffen - 20.11.2014, 23:18
RE: Cookies in Templates - by 666 - 21.11.2014, 15:38
RE: Cookies in Templates - by Milu2K - 21.11.2014, 17:36
RE: Cookies in Templates - by Steffen - 21.11.2014, 17:50
RE: Cookies in Templates - by Milu2K - 21.11.2014, 20:08
RE: Cookies in Templates - by Steffen - 21.11.2014, 20:28
RE: Cookies in Templates - by 666 - 21.11.2014, 22:21
RE: Cookies in Templates - by Steffen - 21.11.2014, 22:22
RE: Cookies in Templates - by 666 - 21.11.2014, 23:06
RE: Cookies in Templates - by Molt - 22.11.2014, 16:15
RE: Cookies in Templates - by 666 - 22.11.2014, 20:15
RE: Cookies in Templates - by 666 - 23.11.2014, 20:31
RE: Cookies in Templates - by Milu2K - 24.11.2014, 11:56
RE: Cookies in Templates - by Steffen - 24.11.2014, 13:20
RE: Cookies in Templates - by Molt - 25.11.2014, 15:37
RE: Cookies in Templates - by 666 - 25.11.2014, 16:47



Users browsing this thread: 1 Guest(s)