Jump to content

7Studio

Members
  • Posts

    58
  • Joined

  • Last visited

  • Days Won

    1

7Studio last won the day on June 21 2022

7Studio had the most liked content!

Contact Methods

  • Website URL
    https://7studio.eu

Profile Information

  • Gender
    Male
  • Location
    Poland

Recent Profile Visitors

2,728 profile views

7Studio's Achievements

Full Member

Full Member (4/6)

82

Reputation

  1. I understand the design decisions behind this change, but please consider restoring the showcase section on the home page (even a simplified one). Regardless of the target audience, in my opinion, this is one of the most important sections. Words are important, but for a new visitor, they're just words (any other solution will try to describe its advantages). Visitors need examples to illustrate these words, and in my opinion, the admin panel screenshots at the top aren't sufficient. The showcase provides first rough examples of what can be built and what the user can achieve before they decide to invest their time — for example, downloading and installing ProcessWire. They can also encourage users to dive deeper, reading more, looking for features, etc. Just my 2 cents.
  2. Understand, guess that I'm missing your use case scenario. Above code was meant just to "custom sort" results that you can limit and get with a pw regular find() selector, definitely not for sorting all pages.
  3. Another option could be to create a new page array, add your "when" or "published" timepstamps as an extra value to all elements for sorting purpose. Finally you can sort pages via PHP native "array_multisort". (This is what I'm usually using when needed custom sorts). Not tested, but guess it should work - simple function example: function customOrder() { // your selector $selector = 'template=events'; $matches = wire('pages')->find($selector); // if we find any matches if($matches->count) { foreach($matches as $match) { // assign "myorder" to all items for sorting purpose // any logic if ($match->when) { $match->myorder = $match->when; } else { $match->myorder = $match->published; } } // temp array $array = $matches->getArray(); // sort array by myorder value with PHP array_multisort array_multisort( array_column($array, "myorder"), SORT_DESC, $array ); // create and return new PW pages array $results = new PageArray(); $results->import($array); return $results; } return; }
  4. This is quite old topic but I just wanted to add that you can specify own folder by using WireIncludeFile, (code used in another purpose - please treat it just as an example - but should work also for the Page Table field) <?php foreach ($page->page_table as $section) { $file = 'layout/sections/'. $section->template->name .'.php'; if (file_exists($file)) { wireIncludeFile($file, array("section" => $section)); } else { echo __('no section layout file found'); } } ?> API reference WireIncludeFile In example above $section is passed as a page reference, so in your section files $section will behave as $page for that template. I'm not sure if the PageTable is a good replacement for this purpose, teppo PageTableNext module could work better here.
  5. @ErikMH Thanks a lot! I haven't heard about Vultr before. I will take a closer look ? I agree about RAM, from my experience software (like litespeeed), disks - nvme ssd (especially for the database) are making a big difference. RAM and fast CPU plays a big role when traffic goes up. Thank once again! Maybe someone else will share experience with other hosts ?
  6. Hello guys, I'm rebuilding site with PW for an old client, and he asked about hosting change. Currently he is using Bluehost, but had some problems with them and looking for a switch. Since most of his clients comes from states, he think about hosting located directly in US. The site is quite small with low traffic. Any recommendations of a good shared hosts with good price/quality ratio? Thanks in advance!
  7. I would love to see some kind of a bare bones of e-commerce features in the core, that could help to build a basic small shop directly in PW, without the need of integrating with third party e-commerce systems like Shopify etc. Just thinking out loud ? Have a great weekend!
  8. @ryan "Page Edit Children" module looks great! I have a small question (maybe a silly one but unfortunately I don't have a ProFields subscription to check this one out) is there an option to hide children pages from normal pages tree list in the admin? to manage children only from the parent edit screen?
  9. TinyMCE inherits this class names from the Page Edit Image module, you can change these classes in the: modules -> configure -> ProcessPageEditImageSelect module
  10. Hi @ryangorley, as @elabx mentioned: 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: (site.com) -blog --blog-category ---blog-post -blog-tags --blog-tag 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: site.com/blog/category-name/post-name site.com/tags/tag-name "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): blog.php <?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; ?> ... </main> blog-category.php <?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; ?> ... </main> blog-tag.php <?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; ?> ... </main> 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"> .... </article> <?php endforeach; ?> </div> <?php echo $posts->renderPager(); ?> </div> 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.
  11. @heldercervantes thank you!
  12. 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!
  13. thanks for all the details, I will keep an eye on it, please let me know if that will happen again ?
  14. @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!
  15. @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 ?
×
×
  • Create New...