Hi Everyone,
I need to display the subsections of the current top section in the menu and used the code as follows:
<actinic:block if="%3cactinic%3avariable%20name%3d%22PageType%22%20%2f%3e%20%3d%3d%20%27Section%27" >
<actinic:block php="true">
// Section page - remember current section info
$thissectionid = '<actinic:variable name="SectionID" encoding="perl" selectable="false" />';
$foundparent = false;
</actinic:block>
</actinic:block>
<actinic:block if="%3cactinic%3avariable%20name%3d%22PageType%22%20%2f%3e%20%21%3d%20%27Section%27" >
<actinic:block php="true">
// not on Section page - dummy section info
$thissectionid = 'XXX';
$foundparent = false;
</actinic:block>
</actinic:block>
<actinic:block type="EntireSectionList">
<actinic:block php="true">
$menusectionid = '<actinic:variable name="SectionID" encoding="perl" selectable="false" />';
$menusectionlevel = '<actinic:variable name="SectionLevel" encoding="perl" selectable="false" />';
if ( $menusectionlevel == 1 )
{
// display top-level sections
echo '<br/><actinic:variable name="SectionName" encoding="perl" selectable="false" />';
}
if ( $foundparent )
{
// sub-section of current section (or possibly we've done them all)
if ( $menusectionlevel == 2 )
{
// woohoo child of current parent
echo '<br/>--<actinic:variable name="SectionName" encoding="perl" selectable="false" />';
}
if ( $menusectionlevel == 1 )
{
// we must be back at a top-level section
$foundparent = false;
}
}
if ( ($thissectionid == $menusectionid) && ($menusectionlevel == 1) )
{
// we've just started on the current section
$foundparent = true;
}
</actinic:block>
</actinic:block>
But the problem is that once I click on one of the subsection pages, the list of subsections disappear and only the main sections are displayed.
I am not quite sure what I need to do with the second block:
<actinic:block if="%3cactinic%3avariable%20name%3d%22PageType%22%20%2f%3e%20%21%3d%20%27Section%27" >
<actinic:block php="true">
// not on Section page - dummy section info
$thissectionid = 'XXX';
$foundparent = false;
</actinic:block>
</actinic:block>
What do I need to replace "xxx" with? And not quite sure about the "not on Section page - dummy section info" message.
Any help would be appreciated.
I need to display the subsections of the current top section in the menu and used the code as follows:
<actinic:block if="%3cactinic%3avariable%20name%3d%22PageType%22%20%2f%3e%20%3d%3d%20%27Section%27" >
<actinic:block php="true">
// Section page - remember current section info
$thissectionid = '<actinic:variable name="SectionID" encoding="perl" selectable="false" />';
$foundparent = false;
</actinic:block>
</actinic:block>
<actinic:block if="%3cactinic%3avariable%20name%3d%22PageType%22%20%2f%3e%20%21%3d%20%27Section%27" >
<actinic:block php="true">
// not on Section page - dummy section info
$thissectionid = 'XXX';
$foundparent = false;
</actinic:block>
</actinic:block>
<actinic:block type="EntireSectionList">
<actinic:block php="true">
$menusectionid = '<actinic:variable name="SectionID" encoding="perl" selectable="false" />';
$menusectionlevel = '<actinic:variable name="SectionLevel" encoding="perl" selectable="false" />';
if ( $menusectionlevel == 1 )
{
// display top-level sections
echo '<br/><actinic:variable name="SectionName" encoding="perl" selectable="false" />';
}
if ( $foundparent )
{
// sub-section of current section (or possibly we've done them all)
if ( $menusectionlevel == 2 )
{
// woohoo child of current parent
echo '<br/>--<actinic:variable name="SectionName" encoding="perl" selectable="false" />';
}
if ( $menusectionlevel == 1 )
{
// we must be back at a top-level section
$foundparent = false;
}
}
if ( ($thissectionid == $menusectionid) && ($menusectionlevel == 1) )
{
// we've just started on the current section
$foundparent = true;
}
</actinic:block>
</actinic:block>
But the problem is that once I click on one of the subsection pages, the list of subsections disappear and only the main sections are displayed.
I am not quite sure what I need to do with the second block:
<actinic:block if="%3cactinic%3avariable%20name%3d%22PageType%22%20%2f%3e%20%21%3d%20%27Section%27" >
<actinic:block php="true">
// not on Section page - dummy section info
$thissectionid = 'XXX';
$foundparent = false;
</actinic:block>
</actinic:block>
What do I need to replace "xxx" with? And not quite sure about the "not on Section page - dummy section info" message.
Any help would be appreciated.
Comment