Jump to content

christophengelmayer

Members
  • Posts

    11
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by christophengelmayer

  1. @pmichaelis I just released version 0.0.6 which fixes the "Class not found" issue. https://github.com/christophengelmayer/StaticWire
  2. Hi everyone, I'm working on a CLI script that renders paginated pages. Therefore I iterate trough paginated pages and set the page number and render the result. My problem is, after calling the render function for the first time, the output doesn't change even if I change the page number. DEMO: I'm using a template that renders a pagination of its children: <?php echo $page->children("limit=3")->render(); ?> I can view the paginated results in the Browser: /page-rendering-pagination/ /page-rendering-pagination/page2 /page-rendering-pagination/page3 ... When trying to render the different pages using the API I always get the first result, even if I change the page Number. <?php namespace ProcessWire; include('./index.php'); wire('input')->setPageNum(1); $p = wire('pages')->get('/page-rendering-pagination'); var_dump($p->render()); // renders first three items wire('input')->setPageNum(2); var_dump($p->render()); // also renders the first three items Am I missing something? Is there some kind of caching mechanism that I'm not aware of? Thanks for your help.
  3. Just pushed version 0.0.5 to GitHub. I changed the namespace to "ProcessWire". @matjazp Thanks for the hint.
  4. @matjazp I'm not familiar with fields of type "Module Reference". Which FieldType do they use? Could you describe how to create a template that reproduce this issue. Or can you share the site package for this project. I'd like to look into this issue.
  5. If you use ProCache you don't need StaticWire (imho). StaticWire is built for a different usecase. The Plugin (currently) does not export any assets. It basically iterates over all pages, calls the render() function and stores the output in an index.html file in a folder that matches the pages URL. You have to take care of the needed assets by yourself.
  6. I just relased an update (0.0.5) which maybe fixes this issue. The problem was, that the module also tried to export the admin pages. This is now prevented. I tested it with the demo site packages (beginner, blank, classic, default, languages, regular) and it worked on all of them.
  7. Thank you. It definitely makes sense for a production environment where, for example, processwire runs on its own (hidden or whitelisted) domain. I‘m also thinking about using it as a backup tool or just a local tool for editing content and exporting static sites. I‘ve used wget to create static sites before but it always involves a lot of manual editing to correct urls and asset paths. So I came up with the idea to use PW to directly render pages to html. Currently I‘m thinking about a solution to also render paginated pages.
  8. It happens when editing the page, not exporting? Can you post the template code, looks like some Namespace issue.
  9. Hi everyone, Introducing my first module https://github.com/christophengelmayer/StaticWire It's a simple way to convert your ProcessWire site to static HTML files via CLI or the admin interface. Useful in CI/CD scripts or to use ProcessWire as a simple static site generator.
×
×
  • Create New...