-
-
Save onre/408a2859ab1d8a775fab to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# mysite/_config.php line | |
ShortcodeParser::get('default')->register('Sukutaulu',array('Sukuposti','SukutauluShortCodeHandler')); | |
# mysite/code/Sukuposti.php | |
class Sukuposti { | |
public static function SukutauluShortCodeHandler($arguments,$parser = null) { | |
print_r($arguments);exit; | |
if (empty($arguments['spnro'])) { | |
return; | |
} | |
$template = new SSViewer('SukupostiSukutaulu'); | |
return $template->process(new ArrayData($arguments)); | |
} | |
} | |
# themes/simple/templates/Includes/SukupostiSukutaulu.ss | |
sukutaulu: $spnro | |
# the stuff I've input into WYSIWYG editor: | |
[Sukutaulu spnro=123456] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment