Jump to content

AndZyk

Members
  • Posts

    654
  • Joined

  • Days Won

    8

Everything posted by AndZyk

  1. Good comparison and and I can agree to almost all of your statements, except: Personally I would count that as disadvantage because Craft is forcing you to use one special template engine. I know you don't want to start a discussion about Twig vs. PHP, so I just want to say that I think it is better to be able to switch template engines like in ProcessWire instead of being forced to use one template engine. ? That and the expensive pricing were the reason why I never used Craft for a project yet. But I can understand why you like it so much.
  2. Thank you for your explanation. In this case I would just use an additional if-condition. if ($child->hasChildren() && $child->template->name !== "blog-post") { // Subnav } Maybe not elegant but simple. ?
  3. Maybe I am missing something, but wouldn't it be enough just to check for $page->hasChildren()? What is the benefit of the extra check of the template settings? I always just use $page->hasChildren() for building navigations, because if I have set in the template that a page cannot have children, it will not have children. ?
  4. Hello @Val_0x42, You could make an AJAX call on your page at the change of a checkbox and save the user data then instead of the form submission. I would also use regular ProcessWire users to get the benefits of access control. Regards, Andreas
  5. Hello @prestoav, I don't have a solution, but I can confirm that I recently had the same issue. I tried to change a page name but every time I saved it was the old name. I noticed that this only happened on my local development environment (ProcessWire 3.0.19x & MAMP PRO) and on a staging server it was possible to change the name. Maybe somebody else had this issue too or a theory. Regards, Andreas
  6. Hello @SwimToWin, if you use has(), you have to use a selector instead of an integer: $page->config->has("id=1898"); // returns true If you use find(), you get an PageArray as return: $page->config->find(1898); // returns PageArray count($page->config->find(1898)); // returns 1 Regards, Andreas
  7. Hello @rushy, I have made something similar for a project: Users can select some media files from a media-center and share their collection via a link. For this I have a page where I first store their collection in the LocalStorage or in a cookie and the users then can share their link with a form that creates a new hidden page storing this selection in a Page Reference field. This page will be automatically deleted after a month. You can have a look here at this function here (you can add files with the cart symbol). If you want to I can share some of my code. If you want to share only one page then maybe you should store the shared links in a repeater and automatically delete the repeater items after some time. Regards, Andreas
  8. Hello @gerritvanaaken, there are new buttons in Repeater items for cloning before or after an item: https://processwire.com/blog/posts/new-repeater-and-repeater-matrix-features/ Also: Regards, Andreas
  9. Hello @fruid, the $sanitizer->text() method has a stripQuotes option: stripQuotes (bool): strip out any "quote" or 'quote' characters? Specify true, or character to replace with. (default=false) I think this should work: $sanitizer->text($yourText, ["stripQuotes" => true]); Regards, Andreas
  10. Here is the documentation for how to use multi-language with ProcessWire: https://processwire.com/docs/multi-language-support/ What you are looking for are probably multi-language fields, like mentioned before. Sadly the video explaining this topic is private nowadays. ?
  11. Yeah it is a strange error. Clearing the browser cache also didn't work for me. On our webhoster I had no error but on my local MAMP server. Either the error was gone after a MAMP upgrade or it was a server cache issue. But I think eventually the error will go away. ?
  12. Hello @aagd, me and some others had this issue as well: I thought that it would have something to do with the language pack, but I think it was a caching issue because nowadays this error didn't occur to me anymore. Regards, Andreas
  13. Hi @strandoo, I think this could work: $biographyPages = $pages->find("biography!="); foreach ($biographyPages as $biographyPage) { $biographyPage->save("biography"); } https://processwire.com/api/ref/page/save/ Regards, Andreas
  14. Thank you @lokomotivan and @wbmnfktr for your insights. ? I can see that a headless CMS + SSG can bring advantages in performance and flexibility. I am not sure if this way of developing websites is something for me, but maybe I will try it out. Especially the performance improvement with SSGs is something that interests me. ?
  15. Maybe this question is too general and I don't want to hijack this topic, but: What are your reasons/advantages for using a headless CMS? Is it performance, targeting different channels than browsers or is it more fun to structure your content? I am curious, because I am still building websites the traditional way. ?
  16. Hello @fruid, is your selector finding any pages? I think you have to add "include=hidden" to your selector: https://processwire.com/docs/selectors/#access_control Edit: Reading further, I think your selector should work. I have never used a selector with "status", so sorry I don't have a clue. ? Regards, Andreas
  17. Just to give my two cents: As a solo developer I think it would be nice to have an automated generation of config files to version control template and fields in Git, but I can absolutely understand Ryan if he doesn't find it necessary as solo developer for his workflow. Especially with his tools for Export/Import fields, templates and pages. For teams working on a project a good version control would be really helpful in the coordination, but as a solo developer I enjoy the way of creating and configuring templates and fields in the backend of ProcessWire. The last thing I want to is to have to write blueprints and migrations for simple configurations. For example the CMS Kirby uses blueprints in YAML for its templates and fields and this is of course great for version control, but I find it slows down the development process, because you have to study the reference documentation instead of just creating a template or field in the back-end. In Kirby it is part of the core concept, but in ProcessWire it is not and I hope it stays this way. If these config files for templates and fields would be automatically generated in YAML or JSON somewhere in the sites-folder, where I could version control them, this would be nice. But personally as solo developer I don't want to waste my time with writing configurations files or migrations and composer dependencies.
  18. TBH I totally forgot about the Export/Import feature of templates and fields until I have read about it here again. My workflow was to have two windows open (developement and staging/production) and manually rebuild fields I have created in my development environment. But export/import is way easier. Thank you for reminding me. Maybe this feature should be more prominent with additional buttons at the beginning of the overview for people like me who don't look at the end of the page. ? As for the other discussed solutions: A JSON/YAML solution would also be great for version control, but for me it would not be necessary, because in my experience the gap between development and staging/production is not that large. But for large websites this could be handy.
  19. Hello @kongondo, I am not a Padloper user, but I have noticed an increasing number of Padloper threads in the Dev Talk topic. Right now I am counting 6 threads for Padloper (1 pinned). Wouldn't it be better to have a dedicated place for Padloper? For example here: https://processwire.com/talk/forum/57-module-specific-support/ Since Padloper is a module and the Dev Talk section is "A place for general development and coding discussions." I think this would be a better solution for Padloper and non-Padloper users. ? Regards, Andreas
  20. There was a poll in 2017: https://weekly.pw/polls/#which-site-profiles-should-be-bundled-with-processwire Personally I only use the blank site profile. But for beginners one starter site profile would be necessary. I don't think there is a need for multiple site profiles, but that is just my opinion. Other CMS offer two separate downloads (one blank and one starter download). This could also be an option.
  21. Hello everyone, for anybody using Gravatar who didn't hear the news: Gravatar had a data leak exposing the name, username and email address of your public profile: https://monitor.firefox.com/breach-details/Gravatar For me reason enough to never use Gravatar again, but that is of course my personal decision. ? Regards, Andreas
  22. Hello @SwimToWin, just out of curiosity: Is there a source for this statement? I don't quite believe that this makes any difference at all. Also you can already achieve this by using for example URL segments on your homepage: https://processwire.com/docs/front-end/how-to-use-url-segments/ You would just have to check the URL segment with the page somewhere else in the page tree. Regards, Andreas
  23. Thank you for the update. I am always using the latest MAMP PRO and didn't notice this issue anymore. But I also defined as workaround a own config variable "useWebP", which I set to false for my development environment. ? <picture> <?php if ($config->useWebP): ?> <source srcset="path/to/image-webp" type="image/webp"> <?php endif; ?> <img src="path/to/image"> </picture>
  24. I had this issue on my local MAMP server for a while, when the new master version came out. But now it never occured to me again. First I also suspected the language pack, but now I think it might was a chaching issue. Although I had cleared all chaches. ?
  25. AndZyk

    other CMSs

    Thank you, for linking to the post I was refering to. In my opinion "lack of interest" and "lack of expertise" goes hand in hand, but yes he showed willingness to support this feature on the PHP side. ? I still hope, that the Repeater Matrix could be enhanced as layout builder, because many of us use it already and it has already the blocks feature. Also the layout builder feature was one of the most requested features of the community at the beginning of this year and was discussed a few weeks. But if it is too complex to enhance the Repeater Matrix, I can understand that. ?
×
×
  • Create New...