Created
May 26, 2012 07:29
-
-
Save andrewminton/2792773 to your computer and use it in GitHub Desktop.
Get Child pages DS by David Hund
This file contains hidden or 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
<?php | |
require_once(TOOLKIT . '/class.datasource.php'); | |
Class datasourceget_child_contentpages extends Datasource{ | |
public $dsParamROOTELEMENT = 'sub-content-pages'; | |
public function about(){ | |
return array( | |
'name' => 'Get Child Contentpages', | |
'author' => array( | |
'name' => 'David Hund', | |
'email' => '[email protected]'), | |
); | |
} | |
public function allowEditorToParse(){ | |
return false; | |
} | |
public function getSource(){ | |
return '1'; | |
} | |
public function grab(&$param_pool){ | |
$param_pool['child-content-pages'] = Symphony::Database()->fetchCol('handle', 'SELECT `handle` FROM `sym_pages` WHERE `parent` = '.$this->_env['param']['current-page-id'].';'); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment