Recently Browsing 0 members
No registered users viewing this page.
I have a user page template with many fields that are organised in tabs. Tabs do not work on the profile edit screen. So I had to find a way how to let users edit their page with tabs in place.
The way I solved this is having users edit their user page in the backend instead of their profile page. So basically they are on a page edit screen and not on their profile edit screen which is a different process. The drawback of this method is that the users edit their profile on a URL like .../youradminurl/access/users/edit/?id=1377. So I needed to make sure that users cannot edit other users' profiles by just switching out the id. I did this through hooks that redirect them to their own profile.
This is far from a perfect solution. Ideally I would like to mask the page edit url to something like /myprofile but haven't found a way on how to do this, yet.
How would you go about this?
redirect rules in .htaccess hooking into the profile edit process? Either way I couldn't figure out how to accomplish it. Any pointers towards a solution would be very much appreciated.
By Robin S
This module corrects a few things that I find awkward about the "Add New Template" workflow in the PW admin. I opened a wishlist topic a while back because it would good to resolve some of these things in the core, but this module is a stopgap for now.
Originally I was going to share these as a few standalone hooks, but decided to bundle them together in a configurable module instead.
Add Template Enhancements
A module for ProcessWire CMS/CMF. Adds some efficiency enhancements when adding or cloning templates via admin.
Derive label from name when new template added: if you like to give each of your templates a label then this feature can save some time. The label can be added automatically when templates are added in admin, in admin/API, or not at all. There are options for underscore/hyphen replacement and capitalisation of the label. Edit template after add: when adding only a single template, the template is automatically opened for editing after it is added. Copy field contexts when cloning: this copies the field contexts (a.k.a. overrides such as column width, label and description) from the source template to the new template when using the "Duplicate/clone this template?" feature on the Advanced tab. Copy field contexts when duplicating fields: this copies the field contexts if you select the "Duplicate fields used by another template" option when adding a new template. Usage
Install the Add Template Enhancements module.
Configure the module settings according to what suits you.
On a new pw 3.0.89 installation of mine I've got a problem with role permissions. The setup is like this:
Templates: home, basic-page, text-only, folder
All of these have no restrictions in the "family" section and all of them have the same access definitions (see edit-template.jpg below)
There is a role "redaktor" that has permission to edit, add, delete, move and also clone pages (see permissions.jpg below).
Now, when logged in as a user with this role, I can only choose from basic-page and folder. The text-only template is not available.
By Thomas Diroll
Hi guys I'm relatively new to PW and just finished developing a page for a client. I was able to include all necessary functionality using the core fieldtypes but now I it seems that I need to extend them with a custom one. What I need is a simple button, that copies the absolute url (frontend not PW-backend) of the page which is currently edited to the clipboard. As this feature is only needed inside a specific template, I tend to use a custom fieldtype which provides this feature. I've been looking inside the core modules code (eg. FieldtypeCheckbox.module) but I don't really get the structure of it and how its rendered to the admin page. I also didn't find a lot of tutorials covering custom fieldtypes.
Maybe some of you could give me some tips on how to write a basic custom fieldtype that renders a button which copies the value of
page->httpUrl() to the clipboard using JS. Thanks!
I am working on a website and I want to style the login page, but I'm a bit confused.
I want either the existing login page styled in my own way using some CSS (I guess I prefer that) or I want to create a custom page with a form to login. (Which I could style too).
I used the code from Ryan and Renobird posted here - which works great - but that doesn't replace the original login page.
Is there a way to some sort of 'disable' the original login?
I hope my question is clear and thanks in advance,