Jump to content

AndZyk

Members
  • Posts

    568
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by AndZyk

  1. Thank you for the correction. πŸ˜‰ This is not related to ProcessWire, but depending on wich slider-plugin or own slider-solution you want to use, the CSS classes or even the HTML markup would be different. For example: Slick: https://kenwheeler.github.io/slick/#getting-started Swiper: https://swiperjs.com/get-started#add-swiper-html-layout Flickity: https://flickity.metafizzy.co/#getting-started Regards, Andreas
  2. Hello @cpx3, do you have added a field of the type "ProField: Functional Field" added to any of your templates? If you don't have a field of this type added to your templates and try to use the functional fields methods in your template file ( with f.e. __richtext() ), you will get an error. I don't think it matters which template has this field, but a least one template needs it. Regards, Andreas
  3. Hi @Gary, you could: Install the core module Repeater Create a repeater field "slider" Create a textarea field "textarea" Add the textarea field to your repeater field "slider" Add the repeater field to your template Add content to the repeater in your page Then you could output your repeater in your template file like this: <?php if (count($page->slider)): ?> <ul class="slider"> <?php foreach ($page->slider as $slide): ?> <?php if ($slide->textarea): ?> <li class="slide"> <?=$slide->textarea?> </li> <?php endif; ?> <?php endforeach; ?> </ul> <?php endif; ?> The HTML markup depends on what slider plugin for the fron-end you want to use. Regards, Andreas
  4. I am not sure if this is possible, because non-superuser can only delete their own pages. So this button would make no sense in this case, because they would never have the option to empty the whole trash, just their own. Maybe it is worth checking out this module, if you want a clean trash: https://processwire.com/modules/cronjob-empty-trash/ In my experience clients usually don't care about the trash. πŸ˜€
  5. Source: https://processwire.com/blog/posts/processwire-3.0.107-core-updates/#trash-for-all
  6. Hello @Stefanowitsch, you get the unformatted value of the datetime field probably because output formatting is turned off when bootstraping ProcessWire. You could try to temporarily turn it on and then turn it off again: $page->of(true); // Turn output formatting on echo $page->date; // Should be formatted $page->of(false); // Turn output formatting off again But I would rather just format the date. πŸ˜‰ Regards, Andreas
  7. Hello @chrizz, just wondering why would like to add "www" to the staging url? Thats seems very unnecessary. Instead of adding the $config->httpHost you could try to use $page->httpUrl: $form->action = $page->httpUrl; But including the full url for the form action is also unnecessary in my opinion. It should work with just using $page->url. I think it would be better to decide for just one host. As far as I know $config->httpHost chooses the closest matching host. So in your case staging.website.de seems to be a closer match on your server than www.staging.website.de. I would just not use "www" for the staging url and use a relative url for the form action. πŸ˜‰ Regards, Andreas
  8. You are right. The sort order doesn't seem to matter. What seems to matter is the closest match: Strange that it is only possible to set one host in the config-dev.php. Could this be a bug? But yes in this case some sort of if condition could be the way. Either with an own config variable or the PHP server variable. If you have a $config->httpHost (without s) defined, it always seems to come first: if ($config->webpackHost) { $config->httpHost = "localhost:8080"; } Ah, then this seems to be something webpack specific. I have no experience with webpack, i am still using good old CodeKit on Mac for compiling. But I am wondering why with webpack your assets don't work on both hosts. With CodeKit I got my live reload host (my-mac.local:5757) and my normal host (example.dev) and both show the same assets.
  9. Hello @bernhard, you can add multiple httpHosts in your config file as array: $config->httpHosts = array( 'example.dev', 'localhost:8080' ); Source: https://processwire.com/docs/start/variables/config/ Also you could have a separate config file "config-dev.php" for your development environment: For the HTTPS issue, you could try to this: $config->noHTTPS = 'localhost:8080'; Source: https://processwire.com/blog/posts/pw-3.0.99/ I have never tried the noHTTPS option, but maybe it could work. Regards, Andreas
  10. Here is the blog post about it: https://processwire.com/blog/posts/processwire-2.6.8-brings-new-version-of-reno-admin-theme-and-more/#new-this-gt-halt-method-for-use-in-template-files
  11. Hello @joe_g, I would use a $session variable for storing the user language. $session->set("userLanguage", $user->language); You could then perform a session redirect: if ($session->get("userLanguage") && $user->language->name === "default") { $session->redirect($page->localUrl($session->get("userLanguage"))); } I have not tested this but think it should work. πŸ˜‰ Regards, Andreas
  12. ProcessWire also offers build in export and import functions for templates, fields and pages. πŸ˜‰
  13. I was thinking about this argument and this is something I also wish that could be improved. There doesn't seem to be a roadmap anymore. The current roadmap is from 2019: https://processwire.com/about/roadmap/ I think it would be nice to revive the roadmap or at least make a poll for what the community is wishing for the most. The last poll was at the beginning of 2021. The current approach that a feature will be added if @ryan has the need for it on a project is not bad, but that leads to many developer centric and less client centric features, which I personally often don't use, because there are already so many developer centric features. πŸ˜€
  14. I had to comment there as well, because I couldn't leave this unfair comment alone. But in my experience this is normal for the heise community and a reason why I don't like to read articles there. πŸ™„
  15. I have read his comment but cannot understand his issue, because I donβ€˜t care how many tables the database has. πŸ˜‚ But the heise-community is sometimes toxic in my experience. Not as friendly like here. πŸ˜‰
  16. WordPress-Alternative: Websites flexibel gestalten und verwalten mit ProcessWire: https://www.heise.de/amp/ratgeber/WordPress-Alternative-Websites-flexibel-gestalten-und-verwalten-mit-ProcessWire-6663030.html heise+
  17. Just wanted to add, that I have given Twig a serious try a few years ago and came to my conclusion that it took me more time to learn first how to do things in PHP and then translate it to Twig than just to do it in PHP. But if you are happy to learn two languages at the same time or are already experienced in PHP then I imagine Twig can be a time saver. πŸ˜‰ I prefer a CMS that doesn't force me to learn a new template language.
  18. 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.
  19. 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. πŸ˜€
  20. 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. πŸ˜‰
  21. 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
  22. 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
  23. 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
  24. 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
  25. 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
Γ—
Γ—
  • Create New...