Need to upgrade a simple plugin to V2
Posted: Mon Nov 02, 2020 8:03 pm
Hello I have an old List Children plug-in that stopped working due to Smarty changes to version 2. of CMSMS. I need someone to spend a little time (paid) to change the code to conform to current Smarty requirements.
Payment via Paypal. Send PM with proposed rate for the project. I may have another plugin or two to fix as well.
This code makes a listing of sub-children of the page (navigation wise), shown parent page whereever this is placed.
Payment via Paypal. Send PM with proposed rate for the project. I may have another plugin or two to fix as well.
Code: Select all
global $gCms;
$manager =& $gCms->GetHierarchyManager();
$thisPage = $gCms->variables['page_name'];
$currentNode = &$manager->sureGetNodeByAlias($thisPage);
$nodes = $currentNode->getChildren();
if ($currentNode->hasChildren()) {
echo '<ul class="sectionlinks">';
foreach ($nodes as $node) {
$content= $node->getContent();
$url = $content->GetURL();
if ($url == "#") { /* section header has no link by default */
$url = "index.php?page=".$content->Alias();
}
echo "<li><a href=\"".$url."\">".$content->MenuText()."</a> </li>";
}
echo "</ul>";
}