Jump to content


  • Content Count

  • Joined

  • Last visited

Community Reputation

3 Neutral

About matsn0w

  • Rank
  1. Exactly what I was looking for! It's just a back-end login, but I want it to look nice, just in case someone accidentaly finds the login page. Thanks for your help, problem solved! matsn0w
  2. Hey all, I am working on a website and I want to style the login page, but I'm a bit confused. I want either the existing login page styled in my own way using some CSS (I guess I prefer that) or I want to create a custom page with a form to login. (Which I could style too). I used the code from Ryan and Renobird posted here - which works great - but that doesn't replace the original login page. Is there a way to some sort of 'disable' the original login? I hope my question is clear and thanks in advance, matsn0w
  3. Fixed it. To me, it looks like the render() function is not working when you unpublish a page. So I now manually render the alert, like this: <?php $alerts = $pages->find('template=bootstrap_alert, include=all'); ?> <?php foreach ($alerts as $alert): ?> <div class="alert alert-warning alert-dismissible fade show" role="alert"> <h4 class="alert-heading"><?= $alert->alert_heading ?></h4> <?= $alert->alert_body ?> <?php if ($alert->alert_dismissable == 1): ?> <button type="button" class="close" data-dismiss="alert" aria-label="Close"> <span aria-hidden="true">×</span> </button> <?php endif ?> </div> <?php endforeach ?> I put this code in a seperate file, so I only have to include it on the pages where I want to show it. This works fine. Thank you all for the help!
  4. Negative, I'm always developing with the Chrome Dev Console open (so cache is disabled) and it also happens in Incognito mode etc. Even on other devices! PS: it shows me the Internal Server Error when I disable Debug Mode
  5. Wait, never mind... I've now unpublished the Alert page, and that works fine for as long as I am logged in, but when I'm logged out (so in the 'guest' view) PW throws me the following error: Error: Exception: Page '/alerts/under-construction/' is not currently viewable. Any ideas?
  6. You are totally right, I can disable that by setting those pages to Hidden, right?
  7. Thank you both for your reactions! I like the way to render() a page, so that's what I do now. Thanks a lot! PS: this is my code now (I know there will be better ways, but I like it this way): <!-- Alert(s) --> <?php $alerts = $pages->find('template=bootstrap_alert'); foreach ($alerts as $alert) { echo $alert->render(); } ?>
  8. Hey everyone, hope you're all doing well! I'm building my first ProcessWire website at the moment, which is of course a very good way to understand all of the possibilities ProcessWire has to offer. But that also means that I'm facing some troubles now and then, and so is the case right now. I made a template for a couple of pages, like the homepage, the contact page, etc. I am using Bootstrap 4.0 for the layout. So here's the deal: I want to show an alert box on top of every page, warning the user that the website is still under construction. Of course, I can just include the code and add the fields I made for the alert into the template, but that means I have to do that for every page, which I obviously don't want. So I made a template with the code and fields for the alert. When I did this, I realised that I can create multiple alerts this way, so I made two pages, containing different alerts. (And converted the code into a foreach-loop in the template). But now my question; how can I include these pages in a different template? Can I make a field or something to insert a page or is this simply not possible? Or do I have to approach this in a different way? I hope I explained my problem clear! Thank you in advance, matsn0w
  • Create New...