-
Recently Browsing 0 members
No registered users viewing this page.
-
Similar Content
-
By Lmwt
Hi there,
I am new to PW but already very convinced. I need to build a dropdown button to browse in a collection of authors by country and language. The dropdown should be editable in the BACK and displayed on the same as the authors collection. I tried my luck with "PageField Creator" but I don't know how to display the dropdown, I simply used:
"$content .=$page->Land;" (the name of the select field)
but nothing is displayed...
I see there is a 2nd module out there to achieve this : "Select Options Fieldtype". I am not sure what is the difference, anyone has a tip?
And a clear tutorial with the necessary steps to build this? I am a bit confused which should be the parent template or page, if it should have a file or not...
Thanks a lot in advance!
-
By Noel Boss
👋 PW Pros…
I have some hooks that I need to bind at the init phase (or even __construct) and I was wondering, and I couldn't find a good and simple way to determine if I'm in the admin. Would be nice if there is a reliable short option to do so, but I can't seem to find one… Is there a coherent way to tell this no matter where I am?
Right now, I use the following method inside one of my modules:
public function isAdmin($page = null) { if ( strpos($this->input->url, $this->urls->admin) !== false || $this->process instanceof ProcessPageList || $this->process instanceof ProcessPageEdit || ($page instanceof Page && $page->rootParent->id == $this->config->adminRootPageID) ) { return true; } return false; } @ryan wouldn't it be nice to have something like wire()->isAdmin(); like wire()->user->isLoggedin(); to tell if we are in admin – very early on (probably even in __construct() phase of modules?
-
By benbyf
Hi!
Been doing some basic Twilio implementation for a client to enable them to automatically send text messages to registered users on page publish. As an upshot, I thought I would strip out the site specific work and stick up on github here: https://github.com/benbyford/TwilioChannels
This modules pulls in the Twilio APi and enables you to send SMS messages from your front or backend.
Send SMS message Truncate message to single message character limit Auto-select number from range of numbers depending on $To number country of origin–this enables you to send messages with a local number to that user if one added to the config. Templates usage:
$twilio = $modules->get("TwilioChannels"); $twilio->sendSMS($toNumber, $message);
-
By J_Szwarga
What is the best practice for having a form (only accessible to a logged in user) save the user's progress between sections of the form? Fieldsets? Multiple forms?
Use case: I have a very long application form that would take 30 minutes for the applicant to fill out and I would hate for all progress to be lost due to user error. The progress needs to be logged into the user's page.
Thanks!
-