Hello Robin,
thank you for your answer!
Yes I am aware of this, but I was looking if there is some solution to override this, or simply make empty page only for structure, which will not react to Processwire page tree, so only visual structure purpose.
Dashboard is not a problem, I have already prepared stuff for this.
Your solution looks very interesting and I will definitely look into it, and I think in each case I will implement this module also. But I was playing, searching, experimenting and here is what I found out like solution in my case:
- I make new template root, which will have the root page - old home page:
<?php
echo $pages->get(1017)->render(); // render content from new Home page
?>
Then I make new home page, and get to it homepage template. And to _head.php I just change navigation to exclude old home page title from nav - so basically use url from root and title from new home page. ( To eliminate issue with url after clicking on home - test.dev/home, expected: test.dev ).
<?php
homepage = $pages->get('/home/');
$children = $homepage->children();
echo "<li><a href='$urls->httpRoot'>$homepage->title</a></li>"; // Making first item in nav, overriding url issue
foreach($children as $child) {
if($child->id == $page->rootParent->id) {
echo "<li class='current' aria-current='true'><span class='visually-hidden'>Current page: </span><a href='$child->url'>$child->title</a></li>";
} else {
echo "<li><a href='$child->url'>$child->title</a></li>";
}
}
?>
So now it is working like charm, but I want to ask if this is optimal solution, if there are some disadvantages for this, maybe in SEO?
I just found out that one problem will be url structure of child pages of home - it is not very charming like this - test.dev/home/about, etc..
Thank you.