Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 06/21/2021 in Posts

  1. Just read this quickly... ProcessWire variables such as $config, $session, $page, etc need to be accessed differently inside functions (check out PHP function scope). One way to access them is via wire, e.g. wire('config'), wire('session'), wire('page'), etc. ProcessWire variables are already global. I don't understand why you are using the PHP global keyword. Others will chime in, with better answers 😀.
    3 points
  2. Hi there! I'm very new to ProcessWire, just found the system about a month ago and have been toying around with it a bit, and I'm loving everything I'm seeing! I'm coming over from the Concrete5 CMS, which I've been working with for 10 years, and one of the primary things that's so alluring to me about this CMS / Framework is that it doesn't try to get in your way. It seems like it's very much built with the mentality of providing the tools to build what you need, rather than forcing you to work around systems built for a specific purpose, and along with that, it seems like the community
    1 point
  3. Quick report: wire works splendidly: <?php function myFunction() { $session = wire('session'); echo $session->future; }; ?> Thanks again, @kongondo, for the pointer!
    1 point
  4. @benbyf I think there are other SendGrid modules you could try out. Caveat: I haven't used any of them.
    1 point
  5. Hi Hi, trying to use this module with Snedgrid but seem to be un able to know if the communication is happening... I've set up an account, verified the domain and email address, set up an API key and adding the code as follows but cant seem to get any emails or activity on sendgrid... anything missing or is this module no longer compatible? $mail = $modules->get('WireMailSendGrid'); $mail->to("******@gmail.com"); $mail->from("site@*********"); $mail->subject("test"); $mail->bodyHTML("hello"); $success = $mail->send();
    1 point
  6. There is no variable value in this module's API. The page id is at the variable info. So: <? php $pageReferencedByMarker = $pages->get((int) $dot->info); // do something with $pageReferencedByMarker
    1 point
  7. Accepting arbitrary pages sounds like a nightmare to support. There's really no upside to it that I can see. Linking existing pages via page reference fields sounds much more doable and logical. You'll avoid all those problems you already recognized.
    1 point
  8. Hi all 👋 I made this searchable UIkit 3.x documentation site to share with everyone. The official doc is great but you can't search across the whole doc. Anyway, here is the URL: https://uikitdocs.netlify.app/ What's missing is the live examples. Perhaps some of you can contribute? Github repo link is on the website as well. Cheers
    1 point
  9. Change Default Language to be None-English | Walk Trough When you start a new (single) language site and the default language shouldn't be English, you can change it this way: Go to the modules core section: Select the Language ones by the filter function: We have four language related modules here, but for a single language site in none english, we only need the base module, named "Languages Support". So go on and install it. After that, you can leave it, ... ... and switch to the newly created Language secti
    1 point
  10. Thanks @Robin S – that's an excellent explanation. I didn't previously know about the difference between PageFinder and in-memory selectors. It'd probably be good if allowable date formats were explained on the selectors documentation page. (I'm not sure what the best process for suggesting documentation updates is.)
    1 point
  11. https://processwire.com/blog/posts/processwire-3.0.107-core-updates/#trash-for-all
    1 point
  12. <?php /** * getFieldsetOf * * for ProcessWire * * gets fields inside a fieldset of pages or templates * choose to retrieve values * * @param Template|Page $context the page or template * @param String $fieldsetName name of the fieldset * @param bool|boolean $collectValues want to collect values of the pages fieldset? * @param string $fieldsetCloseIdentifier default: '_END' * @return FieldsArray|WireData returns FieldsArray or if data wanted, WireData */
    1 point
  13. And here's some code for those that may need it: $myfieldset_start = false; foreach ($page->template->fields as $field) { // or something like $this->templates->get('templatename')->fields if ($field->name == 'myfield') { // opening element of a fieldset is just the field name you gave it $myfieldset_start = true; } elseif ($field->name == 'myfield_END') { // ending element is field name with _END on it - break out of the loop if we reach this break; } elseif ($myfieldset_start == 'true') { // otherwise we are iterating fields in the chosen fi
    1 point
×
×
  • Create New...