Search found 1 match
- Thu Aug 04, 2022 1:45 pm
- Forum: Themes
- Topic: Docs X - Re-ordering the pages in sidebar
- Replies: 4
- Views: 11529
Re: Docs X - Re-ordering the pages in sidebar
Hi I made a simple function for ordering subpages by "position" number:
function renderChildrenListSorted($parentPage) {
$out = '';
$childrenSorted = [];
if ($parentPage->hasChildren()) {
$out .= '<ul>';
$children = $parentPage->children();
foreach ($children as $ch) {
$position = $ch ...
function renderChildrenListSorted($parentPage) {
$out = '';
$childrenSorted = [];
if ($parentPage->hasChildren()) {
$out .= '<ul>';
$children = $parentPage->children();
foreach ($children as $ch) {
$position = $ch ...

