Jump to content

cehlo

Members
  • Posts

    36
  • Joined

  • Last visited

Everything posted by cehlo

  1. Hmm. Error dissapered but I can't get it working, my template names are OK, but nothing changes. Some idea?,
  2. The AdminOnSteroids is just awesome, I didn't know something like this exists. But the other part of your solution does not seems to work the addHookAfter function throws this error: Call to a member function addHookAfter() on null. Some suggestions? ll
  3. 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.
  4. Hi, so I am starting my first bigger project in PW after some smaller. My actual challenge is to make website portal, internal managment of DB and Newsletter. My problem is the structure of pages tree. Normal: - Home - About - ... - Internal Db / hidden / - some basic data structure to manage, members of clubs and their info for example / - Newsletter / hidden / I am finding these little bit chaotic, or misleading for my client and not very good for my purpose. I also want to make admin home page dashboard, where client can choose only to manage website, internal Db or Newsletter. So my idea for better strucure is this: - WebPortal / empty page which only contains all above mentioned / - Website Home - About... - Internal Db - Newsletter I can't find solution for this matter here on Processwire website and my first tries always crashed on moving Home to child, and exclude it from nav etc... Maybe solution is Multisite Modul, but I don ' t need more domains so it is irrelevant. I just really love PW, hope I wil make it here! Cheers. Cehlo
×
×
  • Create New...