Link to LGA pages from pledge page.
This commit is contained in:
@@ -39,15 +39,22 @@ $renderer = new SPLPageRenderer();
|
||||
//print_r($pledgeCandidates);
|
||||
|
||||
$councils = [];
|
||||
$lga_pages_unsort = [];
|
||||
foreach ($pledgeCandidates as $key => $candidate) {
|
||||
$councils[] = $candidate['Council'];
|
||||
$lga_pages_unsort[] = basename($candidate['Path']);
|
||||
}
|
||||
$councils = array_unique($councils);
|
||||
asort($councils);
|
||||
|
||||
$lga_pages = [];
|
||||
foreach ($councils as $key => $council) {
|
||||
$lga_pages[$key] = $lga_pages_unsort[$key];
|
||||
}
|
||||
|
||||
//print_r($councils);
|
||||
|
||||
$pageContent = $renderer->renderPledgePage($councils, $pledgeCandidates);
|
||||
$pageContent = $renderer->renderPledgePage($councils, $lga_pages, $pledgeCandidates);
|
||||
|
||||
if ($pageContent === null) {
|
||||
exit(2);
|
||||
|
||||
Reference in New Issue
Block a user