Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 11/14/2025 in all areas

  1. This week I’ve been working on some useful additions to our Markup Regions system, but I don’t have those additions quite ready to commit to the core just yet. Hopefully next week they will be ready. What it involves is the ability to populate regions within CSS, JS, SCSS, LESS files. So I might output a <style> tag in my markup (for example), but the styles go into a CSS file rather than in the HTML output. That CSS file combines and contains all such instances, and can then be loaded from a dedicated <link> tag in the document head. You could do the same with JS, but using <script> tags instead. I’m not sure I’ve explained it well just yet, so I’ll have a better description of it next week, along with some practical examples. It’s very simple and I think examples will make it obvious. Stay tuned, have a great weekend and thanks for reading!
    6 points
  2. The new site makes a good impression. Simple yet memorable with some nice creative touches. My main suggestion would be to introduce a home page logo grid of brands using ProcessWire. This establishes immediate credibility, followed by a link to the showcase area (featured first, not new). To me that would help make the right impression with clients. Second point is I'd consider brightening the grey background colour a little so the colours feel more vibrant. The first impression is quite grey, and the grey is also in the screenshot.
    2 points
  3. I have created an issue about the same bug a few hours ago: https://github.com/processwire/processwire-issues/issues/2160
    2 points
  4. A hint for whomever used PageRender::renderPage to achieve what is now available with Page::renderPage(). See here to fix your code, which would be broken after the update. A rare time I ever needed to adjust code for a new version. PW is super stable in that regard.
    2 points
  5. Good day, whoever needs this years later) This trick for hook is obsolete after the newly introduces Page::renderPage hook (see here). That is great, but it does break the old way of getting page with the line quoted above. Change the code to something like this: wire()->addHookBefore('Page::renderPage', function (HookEvent $event) { $page = $event->object; ...
    2 points
  6. Hi, Are we the only ones who are running into this error during Updates and Installations of TracyDebugger? It is definitely a new error. Right now I cannot verify, but I want to say that I have seen it across various hosting environments. (I just ignored it before, because they were updates. Now I am trying to create a new installation. PW: 3.0.253 Tracey: latest from Git
    1 point
  7. Do you mean something like this ? $segments = ['earth', 'mars', 'jupiter']; $wire->addHook('(/.*)/(' . implode('|', $segments) . ')', function (HookEvent $event) use ($segments) { $path = $event->arguments(1) . '/'; try { $page = $event->pages->get($path); } catch (\Throwable $th) { $page = new NullPage(); } if ($page->id) { header('Content-Type: application/json'); echo json_encode([ 'path' => $path, 'segment' => $event->arguments(2), 'segments' => $segments, 'page' => $page->title ]); exit; } }); --- $segment = 'get'; $uri = $_SERVER['REQUEST_URI'] ?? ''; if (str_ends_with(rtrim($uri, '/'), $segment)) { $wire->addHook($uri, function (HookEvent $event) use ($segment, $uri) { list($path, $empty) = explode($segment, $uri); try { $page = $event->pages->get($path); } catch (\Throwable $th) { $page = new NullPage(); } if ($page->id) { header('Content-Type: application/json'); echo json_encode([ 'path' => $path, 'segment' => $segment, 'page' => $page->title ]); exit; } }); } This will add a global url hook for url ends with requested segments and you can get page from first url segment than you can print anything you want.
    1 point
  8. Hello @ all The new version 2.3.0 comes with a brand new feature: the possibility to turn a form into a multi-step form. Many thanks to @Jan S. for the idea and the support in testing during the development of the new feature. In a nutshell: A multi-step form is a long form divided into multiple steps. At the end of each step, the user clicks on a "Next" button to go to the next section. In the final step a summary of the data entered will be displayed to the user. The user now has the option to change some of the data if necessary before finally submitting the form. Typical use cases are very long forms, surveys or quizzes. I have written an extra chapter in the docs with a lot more information, which you can find here. There are only 2 restrictions for multi-step forms to work properly: The send button must be after the last step (by the way, it wouldn't make sense to put it anywhere in between ;-)) File upload fields must be placed in the last step (otherwise they won't work) To turn a form into a multi-step form, you only need one new method: addStep() You need to add this method to the form object in the places where you want to make the cut: $form = new \FrontendForms\Form('simpleform'); $firstname = new \FrontendForms\InputText('firstname'); $firstname->setLabel('Firstname'); $firstname->setRule('required'); $form->add($firstname); $lastname = new \FrontendForms\InputText('lastname'); $lastname->setLabel('Lastname'); $lastname->setRule('required'); $form->add($lastname); $form->addStep(); // first step $email = new \FrontendForms\InputEmail('email'); $email->setLabel('Input Email'); $email->setRule('required'); $form->add($email); $form->addStep(); // second step $birthday = new \FrontendForms\InputDate('date'); $birthday ->setLabel('Birthday'); $form->add($birthday ); $form->addStep(); // third step $message = new \FrontendForms\Textarea('message'); $message->setLabel('My message'); $form->add($message); $form->addStep(); // fourth step $button = new \FrontendForms\Button('submit'); $button->setAttribute('value', 'Send'); $form->add($button); if($form->isValid()){ print_r($form->getValues()); // do what you want } // render the form echo $form->render(); That is all! You can find more examples here. To be informed of all the changes in this release, please read the changelog. As always, please keep an eye on whether everything is working as expected and report any issues you discover here or directly on GitHub. Jürgen
    1 point
  9. Funnily I tried exactly this yesterday and no unfortunately it doesn’t work because the repeater will check the access control of the page holding it. However it could a request to add a line to check if its access control is on, something like: public function getAccessTemplate($type = 'view') { if($this->template->useRoles) return $this->template; $p = $this->getForPageRoot(); return $p->id ? $p->getAccessTemplate($type) : parent::getAccessTemplate($type); } I tried and it worked but it wasn’t a fit in the end for what I was trying to achieve.
    1 point
  10. Here's another website that i recently made that I would like to share with the community: https://www.w2-ingenieure.de/ W² Ingenieure (which is german and translates to "W² Engineers") is a small office that offers that develops, modernizes, and optimizes living and working spaces in Germany like: Schleswig-Holstein, Hamburg, and Lower Saxony. Whether for private households, commercial enterprises, public institutions, or industrial plants – they plan and implement customized solutions for even the most complex requirements. This project is a redesign of an existing website. While the old website had plenty of good content, there were multiple flaws in the design (especially the mobile version of the website) so my main task was not to make a from-the-ground-new-concept but to give it a better, functional and more polished look based on the CI. As we are talking about an engineering company that offers planning for the construction industry the look of the site hat to be sleek, clean, somehow modern and overall "serious". We are not talking about a design-agency website here. Tech Talk: - UiKit as frontend framework - RockPageBuilder for content creation and editing - TextformatterRockDown to enable headline formatting - RockFrontend for Ajax Endpoints (used in form submissions) - RockDevTools for Asset Management and Minification - SEO Maestro for SEO meta data - PageImageSource for webp image creation - FileMover as a workaround for a global media management solution - WiremailSMTP to handle form submissions So here it is: The website consists of several page templates, including: - Homepage - Content Page - Project Page - Job Page - etc. The Homepage and Content Page templates can be populated with pre-defined content-blocks via @bernhards RockPageBuilder. This is straight-forward and easy-to use. The user can chose between multiple content elements and place those elements in any order they want: For Example we have: - Textfields - Teaser in multiple variants - Description Lists - Hero Title Image Sections - etc. Once added the content can be edited directly in the frontend or inside a convenient popup window (or from the backend page edit view of course). Other templates like the Project Page offer a more strict, predefined, layout to achieve a uniform look throughout any project page that is crated. These type of pages can be populated from the backend more easily: I have to keep my attachment file list small, so please have a look on this site for yourself and don't hesitate to ask any questions if you would like to know more about the tech in the background. Have a great week! Stefan
    1 point
  11. Welcome to the PW forums @Tenzing ? You can achieve this by setting the URL segments you want to $input before you render the page. E.g. $input->urlSegment1 = 'foo'; $input->urlSegment2 = 'bar'; echo $thepage->render();
    1 point
  12. Thanks wbmnfktr, I did move the files manually and installed Tracy, resulting in a different 500 error upon trying to configure it. I suspect this to be a dev core issue rather than module issue. This is a new installation, so I can easily wipe this and start new. Edit: I also installed an old version of Tracy - or tried. Same error. And that version definitely used to work.
    0 points
×
×
  • Create New...