Ivan Gretsky

Members
  • Content Count

    834
  • Joined

  • Last visited

  • Days Won

    7

Ivan Gretsky last won the day on April 18

Ivan Gretsky had the most liked content!

Community Reputation

1,006 Excellent

1 Follower

About Ivan Gretsky

  • Rank
    Hero Member

Profile Information

  • Gender
    Male
  • Location
    Russia

Recent Profile Visitors

6,319 profile views
  1. Ivan Gretsky

    Ok, I probably messed up a few times, but to give an idea of how it could be done (not tested, maybe not the fastest nor the most beautiful code): <?php // Get all the blog posts with blog_post_fav and blog_post_favs unchecked $pageArrayToPrepend = $pages->find("template=blog-post, blog_post_fav=0, blog_post_favs=0, blog_post_sticky!=1"); // Add all posts with blog_post_fav checked without the 1st one $pageArrayToPrepend->add($pages->find("template=blog-post, blog_post_fav=1, blog_post_sticky!=1, sort=-blog_date")->slice(1)); // Add all posts with blog_post_favs checked without the 1st two items $pageArrayToPrepend->add($pages->find("template=blog-post, blog_post_favs=1, blog_post_sticky!=1, sort=-blog_date")->slice(2)); // Remove duplicates $pageArrayToPrepend = $pageArrayToPrepend->unique(); // Sort and limit $pageArrayToPrepend->filter("sort=-blog_date, limit=" . $blogSettings->blog_quantity)); // Prepend $cards (is there anything in $cards, maybe this is useless variable?) $cards->prepend($pageArrayToPrepend); $pages->find returns a PageArray which inherits WireArray with a bunch of useful properties. Read here https://processwire.com/api/ref/wire-array/
  2. Ivan Gretsky

    I am tying my best to understand what you are tying to achieve, but still do not understand what you're after. Please explain yourself better. The only thing I can suggest now is maybe not doing it all in one selector... <?php $cards->prepend($pages->find("selector1")); $cards->prepend($pages->find("selector2")); // or a one-liner with a fluent interface $cards->prepend($pages->find("selector1"))->prepend($pages->find("selector2"));
  3. Ivan Gretsky

    So If this topic exists, I think I need to mention a fully open source alternative. It is not as mature yet though. It is an app from the developers of ERPNext.
  4. Ivan Gretsky

    Maybe a good time to write your own module and become famous)) They got lots of ready made classes in their plugins for other systems to start with.
  5. Ivan Gretsky

    Languages are Pages in PW (like almost everything else). A user viewing any page in multilanguage environment has a language property attached (see here). So you can do it like this: <?php if($user->language->name != 'default') { echo 'Hello, multilanguage world!'; } You can use $user->language->id if you want.
  6. Ivan Gretsky

    I have to agree with you @diogo, we probably lost this one. But there are many more of them out there coming in here. So putting a smile on, checking if API reference tab is open and back to the keyboard to complete our mission))
  7. Ivan Gretsky

    Hey @trowtlip! I like the idea of ProcessWire also! First, could you please give a link to the module you used. There are a few of the similar ones.
  8. Ivan Gretsky

    It might be @Nvim is a troll, an AI bot or just someone not polite. We should treat them accordingly as soon as we find that out. But they might as well be someone very new to web development, forum software and even English language. I would presume Nvim innocent for now (after reading his other posts). It is more about our community spirit than about someone else) So until some of you moderators ban him, he is a proper forum citizen, I guess)) Come on @Nvim, give me some likes for defending you (and @BitPoet and everyone else you received some good answers from) by clicking the heart icon in the lower right corner under a post. Prove your good will . Install Codelobster or whatever you choose and try out ProcessWire, the favorite CMS of this forum members and simply put the best one in the world at the time of writing. P.S. Forum search is still broken by design, so more duplicate beginner questions will come)
  9. Ivan Gretsky

    There are plenty of similar topics, you can post (and read!) there. https://processwire.com/talk/topic/3518-what-ide-do-you-utilize/ https://processwire.com/talk/topic/18009-recommended-php-editor-or-ide/ https://processwire.com/talk/topic/17550-visual-studio-code-for-processwire-developers/ ... (use Google based search instead of a built-in one) Do not know nothing 'bout Codelobster. I use VS Code for now.
  10. Ivan Gretsky

    Hey, @jrtderonde! If you have some money to spend, maybe you could approach @dadish and hire him to modify his GraphQL for ProcessWire module to handle Repeaters and Repeater Matrix fields? If you decide to make it open source, this would be an amazing contribution to the community. I also tend to use the RepeaterMatrix as a flexible content builder . Suggesting this because you talking about agency and long term plans.
  11. Ivan Gretsky

    Never done it, but think it should be done like this or something... If there will be a number sites on one server which would require different locales it might be a better solution to set it in config.php for each one though.
  12. Ivan Gretsky

    Do not agree with you, @bernhard for a couple of reasons. 1. Choosing ProcessWire over WordPress or some other more popular solution is a hard decision. It is often made because of this forum friendly support before one finds the beauty and power of the system. 2. Every answer we post here helps someone who googles for it later. And even answering the same questions later in time helps to prove the answers still exists and there are people still caring to answer. And often there are more new ways to solve the already solved problem, so the got to be mentioned in this forum. I can see @Nvim came here to learn about ProcessWire, to compare it with other solutions he knows about. Just maybe in a year or two he (or she?) will be the author of a new e-commerce module for PW, who knows)) If he does not stop here, the discovery of ProcessWire may become the beginning of one of the most exciting adventures for him (her?) as it was for me and so many others here, who perfectly know and have used systems like WordPress, Drupal, Joomla or MODx.
  13. Ivan Gretsky

    I thought it would be vice versa: integrating some king of e-commerce/shopping cart functionality into PW. So many ways to handle things!
  14. Ivan Gretsky

    Do you have such an experience, @clsource? Can you elaborate on this?
  15. Ivan Gretsky

    Look for Padloper.