Jump to content


  • Posts

  • Joined

  • Last visited

  • Days Won


Posts posted by 7Studio

  1. Hi @ryangorley,

    as @elabx mentioned:

    11 hours ago, elabx said:

    I'd say the best way is the one that fits your use case and in that sense ProcessWire has no rules about categorization.

    and his proposed solution is one of many that you can use. Personally I'm building blog structure similar to the one that you are after, so I will try to share my setup.

    Usually I have 5 page templates structured as follow:

    with pages relations (parent - children) setup in the backend, so you can publish only specific page under specific parent,  In this setup your urls will looks like:


    "Tags" parent page is published under global home page - with status hidden so it is excluded from searches, menus etc.

    It helps to shorten url, you can add tags directly on the page tree if you wish and by using "tags" field while editing posts.

    Blog post have also own "published_date" date field, that is used to sort posts on the site, but also on the page tree in the backend. You can also use this date value in the selector to ommit rendering pages with future date on the archive page (I'm not sure about SEOMastero).

    I have one global archive page that is rendered from: blog, category and tag pages to avoid repeating of code.

    So my code in the templates looks like this (simplified):


    <?php namespace ProcessWire; 
    $posts = $page->find('template=blog-post, limit=12, sort=-published_date');
    <main id="main" class="main">
      <div class="header">...</div>
      <?php if (wireCount($posts)) : ?>
      <?php wireIncludeFile('layout/archive/archive.php', array("posts" => $posts)); ?>
      <?php endif; ?>


    <?php namespace ProcessWire; 
    $posts = $page->children('template=blog-post, limit=6, sort=-published_date');
    <main id="main" class="main">
      <div class="header">...</div>
      <?php if (wireCount($posts)) : ?>
      <?php wireIncludeFile('layout/archive/archive.php', array("posts" => $posts)); ?>
      <?php endif; ?>


    <?php namespace ProcessWire; 
    $name = $page->name;
    // query posts and count
    $posts = $pages->find('template=blog-post, tags=' .$name. ', limit=10, sort=-published_date');
    <main id="main" class="main">
      <div class="header">...</div>
      <?php if (count($posts)) : ?>
      <?php wireIncludeFile('layout/archive/archive.php', array("posts" => $posts)); ?>
      <?php else :  ?>
      <h1><?php echo sprintf(__('There is no articles tagged with: %1$s'), '<i>'. $name .'</i>'); ?></h1>
      <?php endif; ?>

    Please note pages->find and page->children selector, and limits changes for each archive.

    The layout/archive/archive.php file looks like this:

    <?php namespace ProcessWire; 
     * blog archive page
     * @note this archive layout is used by the: blog, tag, category, author templates
    <div class="blog">
    	<div class="grid-3">
    		<?php foreach ($posts as $key=> $post) : ?>
    		<article class="article">
    		<?php endforeach; ?>
    	<?php echo $posts->renderPager(); ?>

    To avoid getting blog posts with future dates you may add to selectors "published_date<=today". 

    Regarding to publish scheduling, You can leave blog posts with future date unpublished and use Processwire LazyCron https://processwire.com/docs/more/lazy-cron/ to make them published automatically when the time is right 😉

    Regarding to the tags field, you just need to play with it, it has autocomplete featues etc. so it should work just fine.


  2. Hi @Andy thanks for the kind words!

    Regarding to the multilingual version, this was taken in to account from the beginning and I think that most things are ready (usage of translation strings, backend config.  ... ), site is quite simple, but we will see 😉 thanks for a tip!

    • Like 1
  3. 1 hour ago, taotoo said:

    Annoyingly I've just revisited the website and it's no-longer doing it! I'll check it again later. The GPU is a GTX750, and the display is low pixel density, with no scaling involved.

    thanks for all the details, I will keep an eye on it, please let me know if that will happen again 😉

    • Like 2
  4. 55 minutes ago, taotoo said:

    On Chrome (and Firefox) on Win10 I do notice that with the browser window wider than about 1,000 pixels my mouse cursor slows down. The wider the window, the slower it gets. At 2560px wide, the mouse is at about half speed. This is with a modern CPU and also a GPU.

    @taotoo thanks for a notice! I'm also on Win10 (integrated GPU, FHD display) but I can't replicate this issue on Chrome/Firefox. Could you please let me know what kind of GPU is that and what display are you using (hdpi with windows scalling)? will try to debug this further 😉 Thanks!

  5. @Stefanowitsch thanks a lot!

    Regarding to your question about animations - there is no extra animation engine involved in here - these are basic CSS3 transitions and animations triggered by JS via the class change (on the elements or on the parents) + there are few 'ontransitionend' JS listners to control animation state or for example to move focus to correct place after animation end.

    This apporach has it's pross and cons - animations/transitions triggered via class change could cause unnecessary browser rendering repaints and affect performance, but if done right are great as you can control almost everything straight from the CSS - timings, easing etc.

    I was trying to optimize all of this quite a bit to not affect performance - animating mostly CSS transforms - translateXYZ(not top/right properties or others that cause repaints), using animations not transitions where possible, continuous transitions like mouse cursor are triggered with requestAnimationFrame to avoid drops in frame rate ...

    'On scroll' animations are controled by native js Intersection Observer API, I'm using only basics here but this API is amazing and you can do a lot of great things with it.

    I guess that it all depends on the project, I'm not plannig to support IE11 here so I choosed native JS. Animations are still quite simple so this approach works well here.

    On the other side if you will have many complicated animations running at the same, going with something like GSAP could give a much better results from performance perspective 😉

    • Like 2
  6. Hi everyone, I would like to showcase a small micro site of own studio - 7studio.eu


    Personally I don't like to design anything for myself (as most projects lands in the trash or on the shelf), but I needed something new and simple quite fast before building a fully fledged portfolio, so I thought to built a small "starting point".

    This is more like a work in progress, than a finished site, it contains only basic info, screenshots of some of the latest works and that's it - as for now 😉

    Technically, on the front end we have a simple custom HTML5/CSS3/JS code, on the back end site uses only core PW features (there is more features already built in on both backend and frontend but not published yet).

    Any comments, suggestions are welcome, hope you will like it and have a great weekend everyone!

    P.s. Sorry - there is no english translation yet, PW multilingual features will land in the upcomming weeks 😉


    • Like 16
  7. Another big update of my polish translation - Version 1.0.8 ( June 22, 2022 ) - fully compatibile with the latest ProcessWire master version - 3.0.200

    In this update:

    • deleted abondend translations
    • deleted files where translations were moved to a different paths
    • added all missing files and translations for new master 3.0.200
    • fixed typos, small changes in current translations

    If you need translations for older versions please check older releases at github


    I'm having problems with login to the modules directory, so please use github, and I will try to update files in the modules directory asap.


    • Like 2
  8. 23 minutes ago, bernhard said:

    That's why I was asking for a generic example. I'd not be happy if lazyLoading was disabled by default. It's imho much better to add one single setting to old installations when needed (and I have not had any issues until now) than to have ProcessWire not use it's full performance by default. I don't know how this feature works internally but I'm sure Ryan has made that decision thoughtfully.

    Good point.

  9. @AndZyk Thanks! ? but as I've mentioned above I would like to avoid those if/else and updating code everytime when I add/change something ?

    After some more testing it looks that the problem lies in my code.
    I'm using wrong method, childTemplates gives me ID of child template, while I should use childTemplates() - that returns array of templates objects, and it works with LazyLoading enabled.

    Working example:

    			if ($item->hasChildren()) {
    				$template = $item->template->childTemplates();
    				foreach($template as $child) {
    					if (!empty($child->noChildren)) {
    						$no_children = true;


    17 hours ago, bernhard said:

     I don't understand. Which property can you not access? Can you give a generic example?

    @bernhard basically I couldn't access template object and it values, but this looks more like an edge case, and I couldn't find more generic example. You would need to have a similar setup (let say blog as parent template + child blog-post template that doesn't allow childrens) + code needs to lands in the _init.php and you have to be logged in.

    $parent   = wire('pages')->get('template=blog');
    $child    = $parent->template->childTemplates;
    $template = wire('templates')->get($child);

    With lazyLoading enabled this returns NULL instead of a template object (it ruturns object if you are on a child page).

    As I've mentioned it looks that I was using wrong method, but I think that question still remains if lazyLoading should be enabled by defalut, especially if it can bring some code breaking changes - also like @szabesz mentioned above.

    • Like 1
  10. Hi @AndZyk, Thanks for your reply!

    Maybe I wasn't clear enough, to explain this further - I would like to avoid including childrens as menu items even if they exist in some scenarios, for example hierarchy of my blog looks like this:

    • blog page (blog template)
      • article (blog-post template)
      • article (blog-post template)
      • ...

    In my case blog-post is a template that can't have children, but Your example will display every single blog article title as a child in menu, which of course I want to avoid.

    By checking a blog-post template settings (noChildren allowed value), I can skip articles from beeing rendered in a menu and for example adding "parent" CSS class to blog page menu item.

    I can do the same for other pages that follow same site structure, like portfolio -> portfolio item etc. while using template settings only.

    For menus I prefer to have a single function that is used to render all kind of menus, that simple helps me to limit code and usage of if/else checks for a specific templates while building menu.

    Anyway, since 3.0.194 I can't access these values any longer, (as long as I'm not on a blog post page).

    Lazy loading in this case limits my access to needed values, so I'm wondering what else can't be accessed and if that is not much to have it enabled by default, when PW in most cases is blazing fast (Just loud thinking)  ?


    • Like 1
  11. Hello @ryan, first of all huge thanks for a great addition to the core, but I'm a bit concerned if lazyLoading should be enabled in the core by default as it is since 3.0.194.

    To give an example where I'm having problems - I have a small function that renders site main menu, where I do check if page templates allows to have a children pages (template noChildren value), if not - they are not rendered in main menu (this is my basic setup for pages like blog posts, portfolio items etc. - these are treated as final pages with no children allowed).

    The part of the code that renders site menu looks like:

    			if ($item->hasChildren()) {
    				$id = $item->template->childTemplates;
    				$fields = wire('templates')->get($id);
    				foreach($fields as $field) {
    					if (!empty($field->noChildren)) {
    						$no_children = true;

    Unfortunately since this update, I can't access page templates settings fields values as long as I'm not on that exact page, so in this example all my blog posts are rendered in menu while I'm not on a blog post page.

    Disabling LazyLoading:

    $config->useLazyLoading = false;

    in my config fixes this and brings previous behaviour. Not sure if this is a bug or it was intended, or something is wrong with my code ? but for me one of the most powerfull option of PW is a fact, that I can access anything -page/field/template from anywhere. If that was intended I guess that that other people could have similar problems. While this is a great improvement in overall loading speed, I think that this option should be disabled by default (if it may cause that kind of side effects), and to be left to the final user to decide, if it is needed and should be enabled - same as we don't use cache by default.

    I would love to hear yours and others opinion in this matter. Thanks!

    • Like 1
  12. @bernhard I didn't noticed your edit, most likely the modal does not exist in dom yet or this event wasn't defined when your script fires up - scripts order in the back, thus you may need dom ready.

    Small off topic, I just started to build my first process module so I would like to thank you a lot for your tutorial about adding pages in the backend ? it helps me a lot!

    Back on topic, I'm using modals in the module as well, and I've noticed that this event is always fired three times, so you may think about using debounce to limit it.

    Anyway once again huge thanks for your tutorial about process modules! ?


  13. @Pip You don't have to hack the core module file, as suggested by abdus above, you can define admin email address in your config.php file, so it won't be overwritten by any updates:

    On 10/12/2017 at 11:53 AM, abdus said:

    I've checked out the module source and it doesn't seem to have a customizable `from` address field, so WireMail defaults to admin email.

    public function ___send() {
        $from = $this->from;
        if(!strlen($from)) $from = $this->wire('config')->adminEmail;
        if(!strlen($from)) $from = 'processwire@' . $this->wire('config')->httpHost; 

    Add this line to site/config.php

    $config->adminEmail = 'my@email.com';

    If you want to change the admin email for just LoginRegister.module, than put the line above where you execute the module.

    $config->adminEmail = 'my@email.com';



  14. Right, this could help if your default language will be in one of spanish languages. Sorry, I was a bit to fast with my reply. I guess that in this case you will have to provide a complete translations for both spanish languages even if most of strings would be same/similar. Maybe someone else will suggest solution here ?

  • Create New...