Hi smsHH,
you could use nested function call to achieve this, something like:
However, it is not optimal, because the file has to be read 2 times. A better option would be to write a simple custom function for this purpose:
You can then call this function as follows:
;-)
you could use nested function call to achieve this, something like:
PHP Code:
if(empty(returnPageContent('aktion', 'private'))) {
if(!empty(returnPageContent('aktion'))) {
...
}
}
However, it is not optimal, because the file has to be read 2 times. A better option would be to write a simple custom function for this purpose:
PHP Code:
function getPublicPageContent($slug) {
$data = getXml(GSDATAPAGESPATH.$slug.'.xml');
if(isset($data) && empty($data->private)) {
return exec_filter('content', stripslashes(htmlspecialchars_decode($data->content, ENT_QUOTES)));
}
}
You can then call this function as follows:
PHP Code:
echo getPublicPageContent('aktion');
;-)