-
Posts
5,013 -
Joined
-
Days Won
335
Robin S last won the day on November 16
Robin S had the most liked content!
Profile Information
-
Gender
Male
-
Location
New Zealand
Recent Profile Visitors
The recent visitors block is disabled and is not being shown to other users.
Robin S's Achievements
-
Robin S started following Image Hotspots , File access control at field level rather than template , Render page with urlsegment from API and 6 others
-
File access control at field level rather than template
Robin S replied to DrQuincy's topic in General Support
@DrQuincy, responding to the title of the topic: PW allows for access control at the field level as well as the template level. I don't think you need to do anything special with repeaters or child pages to achieve what you're describing. In your template settings: Do you want to manage view and edit access for pages using this template? > Yes Allow view access for "guest", seeing as you generally want the page to be viewable by everyone. Prevent direct access to file assets owned by pages using this template? > Yes always, regardless of page status or access control In the fields listing for the template, click to edit the files field in template context. Enable access control for the field and remove view access for "guest" (and any other roles who are not allowed to view the files). Now guest users will be able to view the page, but not access the files. -
@Ivan Gretsky, see here for how to render a page with URL segments:
-
@PWaddict, this is due to a breaking change in the core, which I think has been done by mistake. I've opened a GitHub issue for it here: https://github.com/processwire/processwire-issues/issues/2157
- 13 replies
-
- 2
-
-
[solved] I uninstalled a module the stupid way
Robin S replied to ottogal's topic in General Support
@ottogal, my suggestion is to delete the /site/modules/FormBuilder/ folder and everything inside it. It's not the ideal way to uninstall a module but PW will handle it okay. This should stop any fatal errors and then you'll be able to log in and do a Modules > Refresh. There will probably be some FormBuilder-related items on the "Missing" tab of the Modules section. For any item listed on this tab, click on it and then choose the "Remove this module from the database?" option. -
@taotoo, I've released v0.3.8 which appends the field name in square brackets after the field label.
-
Field Access A Process module that provides an overview of field access settings, including template overrides. Usage The table has a sticky header so that the columns can be understood when the table is scrolled. The empty space underneath the table is to allow scrolling to the bottom of the table. There are fields for filtering the table by field name or by template name. The field names link to the Access tab of the field settings, and the template names link to edit the access settings for the field in the context of that template. A collapsed field at the top of the page has information about the meaning of the table column headers, and tips for understanding the values in the table: Table column headers Control: Is access control enabled for this field? View: Roles that can view the field Edit: Roles that can edit the field Show: Show field in page editor if viewable but not editable (user can see but not change) API: Make field value accessible from API even if not viewable Overrides: Overrides of the field access settings in template context Tips If the guest role has view access then it means that all roles have view access. You can hover the guest role in the View column to see a tooltip with all the role names if you want a reminder of those. Overrides: when access control is enabled as a template override, the Control, View, Edit, Show and API columns only display settings that are different from the field access settings. If a column is empty it means the field access setting applies. https://github.com/Toutouwai/ProcessFieldAccess https://processwire.com/modules/process-field-access/
-
Thanks for reporting this @BrendonKoz. It should be fixed in v0.1.4
- 12 replies
-
- 1
-
-
@adrian, it might be something that only happens with particularly complex modules, because I think I've added the namespace to a bunch of my earlier modules and never struck that problem. And if I test with a dummy module... <?php class TestModule extends WireData implements Module { public static function getModuleInfo() { return array( 'title' => 'Test Module', 'summary' => 'Test applying namespace', 'version' => '0.1.0', 'autoload' => true, ); } public function ready() { $this->addHookAfter('AdminTheme::getExtraMarkup', $this, 'doSomething'); } protected function doSomething(HookEvent $event) { $parts = $event->return; $parts['masthead'] .= "hello"; $event->return = $parts; } } ...then I can add the namespace without issue. If I remove the namespace from a namespaced module then I get a server error, but that's not something anyone would need to do. Just a guess, but you could try removing the previously compiled module files from /site/assets/cache/FileCompiler/site/ in the upgrade() method to see if that makes a difference.
-
New blog: Best practices for using API variables
Robin S replied to ryan's topic in News & Announcements
Great post, thanks @ryan. I remember you saying somewhere that when hooking a $pages method it is more efficient to add the hook to the API variable. So better to do this... $pages->addHookAfter('saveReady', function(HookEvent $event) { // ... }); ...than... $wire->addHookAfter('Pages::saveReady', function(HookEvent $event) { // ... }); Is that still true? And if so, is it just the $pages variable that the advice applies to or is it broader than that? -
Weekly update – 10 October 2025 – New ProCache version
Robin S replied to ryan's topic in News & Announcements
Maybe one of these? -
This is an inputfield module I made as a replacement for InputfieldPageListSelect, due to frustration with it not opening the page structure to the currently selected page. Please note the requirement of ProcessWire >= v3.0.248 when using it as an inputfield for a Page Reference field due to this now fixed core issue. The module doesn't make the PW version a strict requirement in case you just want to replace instances of InputfieldPageListSelect via the bundled ReplacePageListSelect module. Page Tree Select An inputfield for selecting a single page from the page tree. This inputfield is similar to the core InputfieldPageListSelect, but it has the following advantages: It automatically expands the tree to the currently selected page. This avoids having to drill down through the tree when you want to change the selection to a sibling or child of the currently selected page. This was the primary motivation for creating the module. It's faster to navigate through because the whole tree is rendered at once rather than branch by branch. It provides a filter feature to locate pages by title anywhere in the tree. When the tree is filtered you can hover a page title to see the breadcrumb path to the page in a tooltip. It provides buttons to clear the current selection, to restore a changed selection, and to scroll to the selected page. Configuration The following config options are available when using the module as an inputfield for a Page Reference field: Exclude admin pages: excludes pages from the tree that have the admin template (only affects superusers who can otherwise see pages with this template). Exclude pages by template: pages having any of the templates you select here will be excluded from the tree. Descendants of any excluded pages are also excluded. Limit for total pages in the tree: this limit is applied to the selector that finds pages for the tree (default is 5000). Limitations and considerations Performance seems to be reasonable when the tree consists of up to 5000 pages. Your mileage may vary and the module may not be suitable for sites with a very large number of pages (unless excluding pages by template in the inputfield configuration). Pages in the tree show their titles rather than any custom setting defined for the template "List of fields to display in the admin Page List". Page titles are only shown in the default language. The module does not reproduce some of the quirks/features of ProcessPageList such as excluding pages that are hidden and non-editable, and forcing the sort position of special pages like Admin and Trash. ProcessWire >= v3.0.248 is needed for the inputfield to appear as an option in Add Field due to this now fixed core issue. Replacing InputfieldPageListSelect in the ProcessWire admin An autoload module named ReplacePageListSelect is bundled with InputfieldPageTreeSelect. Install the module if you would like to replace all instances of InputfieldPageListSelect in the ProcessWire admin with InputfieldPageTreeSelect. For advanced use cases there are two hookable methods: ReplacePageListSelect::allowReplacement($inputfield): set the event return to false to disable replacement on particular instances of InputfieldPageListSelect. ReplacePageListSelect::getPageTreeSelect($inputfield): set excludeAdminPages, excludeTemplates and limitTotalPages properties on the event return InputfieldPageTreeSelect object when replacing particular instances of InputfieldPageListSelect. https://github.com/Toutouwai/InputfieldPageTreeSelect https://processwire.com/modules/inputfield-page-tree-select/
- 1 reply
-
- 17
-
-
-
- module
- inputfield
- (and 4 more)
-
Image Hotspots Allows a Repeater field to be used to define hotspots on an image. Being able to add multiple fields of any type to the Repeater provides flexibility for the information you can store for a hotspot. Setup 1. Install the module. Two decimal fields will automatically be created on install: hotspot_x and hotspot_y. You can set custom hotspot and highlight colours in the module config if needed. 2. Create a "single" image field (i.e. maximum number of files = 1) that you will use store the image that will have hotspots defined on it. Add this field to a template. 3. Create a Repeater field and add the hotspot_x and hotspot_y fields to the Repeater. Add any other fields you need to store information about the hotspots you will create. Save the Repeater field. 4. In the "Details" tab of the Repeater field, expand the "Image Hotspots" section (this section appears for any Repeater field that has the hotspot_x and hotspot_y fields). For "Image field", select the image field you created in step 2. The "Image height" setting defines the maximum height of the image when displayed in Page Edit. 5. Add the Repeater field to the template you added the image field to in step 2. Usage in Page Edit When an image has been saved to the image field, the Repeater field will display a preview of the image at the top of the field. Click "Add New" to create a new hotspot. The hotspot appears at the top left of the image initially and can be moved by clicking and dragging it to the desired location on the image. The X/Y coordinates of the hotspot will be automatically updated as the hotspot is moved. For precise adjustments you can modify the X/Y coordinates directly and the hotspot position will be updated. To identify which Repeater item corresponds to a given hotspot, click on the hotspot. The corresponding Repeater item header will receive an orange outline. Click the hotspot again to remove the orange outline. To identify which hotspot corresponds to a given Repeater item, expand the Repeater item and focus either the X or Y coordinate fields. The corresponding hotspot will be highlighted in orange. On the frontend It's up to you to display the hotspots on the frontend in any way you need. The values of the hotspot_x and hotspot_y fields are percentages so when given absolution positioning over the image your hotspot markers can preserve their positions as the image scales up or down in a responsive layout. https://github.com/Toutouwai/ImageHotspots https://processwire.com/modules/image-hotspots/
-
I think it is out of scope for this module, but it sounds like a useful thing to have in a separate module. I'll add it to my list of things to do.