Page 1 of 1

output actions to renderer

Posted: Fri 11. Dec 2009, 04:38
by Jensensen
http://code.google.com/p/phpwcms/source/detail?r=351
http://forum.phpwcms.org/viewtopic.php?p=119490#p119490
Wiki ToDo http://www.phpwcms-howto.de/wiki/doku.php/

Add output actions to renderer - allows to return specific sections of the page:
index.php?alias&phpwcms_output_action=F-function1|function2--S-SECT1|SECT2.


What the hell?
Sounds interesting. How can we use it? Are there any samples?
Anybody out here? Who already using it?

think there's something to learn about...

Re: output actions to renderer

Posted: Fri 11. Dec 2009, 07:32
by flip-flop

Re: output actions to renderer

Posted: Sat 12. Dec 2009, 00:30
by Jensensen
&phpwcms_output_action=F-trim--S-AJAX
working fine.

Oh Whatever Content this is...


but what about is:
&phpwcms_output_action=F-function1|function2--S-SECT1|SECT2

F-
function1
function2
S-
SECT1
SECT2

what could it be?
for me it's too high in order to understand it.

Re: output actions to renderer

Posted: Sat 12. Dec 2009, 13:22
by marcus@localhorst
da wirst du wohl verschiedene parts abholen können und durch diverse funktionen laufen lassen... ?! ist doch eindeutig?!

Re: output actions to renderer

Posted: Sun 13. Dec 2009, 10:48
by Oliver Georgi
Remember: you have to register any custom function which should be usable this way in var:

Code: Select all

$phpwcms['output_function_filter']
If no custom function is defined only default functions are accessible this way:

Code: Select all

$phpwcms['output_function_filter'] = array('trim', 'strip_tags');
You see - here only trim and strip_tags would be usable.

Filter functions will accept first parameter only.

Code: Select all

function my_output_filter($content='') { return $content; }
So you have to define function - maybe put it in frontend_init:

Code: Select all

<?php
function replaceme($content='') {
    return trim(str_replace('****', 'love', $content));
}
$phpwcms['output_function_filter'] = array('replaceme', 'trim', 'strip_tags');
?>

Re: output actions to renderer

Posted: Tue 29. Jul 2014, 13:22
by Oliver Georgi