4 posts in this topic
Recently Browsing 0 members
No registered users viewing this page.
Noob to Processwire. Trying to convert some older sites to Pwire. I am having trouble including a legacy form class into my templates:
If I embed the php directly in the template, it works. But if I use include statements, the form object returns null.
$form = new Form(init1, 'init2', ...');
$form->param1 = ...;
$form->param2 = ...;
$form->param3 = ...;
My referencing is OK, no error message. The only code that cannot reside in the include file are the following lines:
$form = new Form(init1, 'init2', ...');
My PhP is rusty, maybe that is the problem, but it could be something about Pwire, namespace maybe. I have tested it outside Pwire and no problems.
Please advise. Thanks.
Is there a module or plugin that is like a repeater but you can choose a template? I want something that let's me:
choose a template to get fields from, display these fields like a repeater does add new pages without adding a title or name (this might be achievable using other means like ProcessSetupPageName) delete pages I feel like somebody might have already made a module that does just this, however, I haven't found any. Perhaps there is a way of doing this with a standard repeater that I don't know about.
I have an issue where I want different formats for creating one page. When you are creating a new page I want it to offer different types of fields from when you are editing it.
For example, I have a field called countries which is a multiple page reference field. This is desirable as it is in a very easy to edit format. Currently, I am using selectize.js which makes it possible to search for the pages and add them in a tag fashion. This is how I want it to be when a page is already created. However, when creating a new page it is often easier to just paste a list of all the countries as text. This is because the data is coming from an old website where the countries are written like this:
I can code something which converts this text into the multiple page reference fields but I am not sure how to go about it. At first I tried making another template which had fields that were in this “quick” format. Then I planned to make it such that when you add one of these quick pages it creates a page in the standard format and deletes itself. This has it’s own problems such as where to place the new page, what title and name to give it, whether to have just one quick page or multiple and when to delete it. It just didn’t seem right.
Another possibility would be to show special quick fields when creating a new standard page but hide them when the page is saved and show the standard fields. I am not to sure how to achieve this though.
Does anyone know a better way of going about this? I feel like this is a simple problem which already has an elegant solution.
In one Page I would like to put a lot of url.
There is url's field.
Now, I add url's field to one template, but I don't know to add 2 or 3 or 10 url's field in that same template... the problem is simple, but processwire don't allow it...
I wanted to share something I have been working for quite some time, in total currently three premium Templates or Site-Profiles for ProcessWire 3 including a onepage template, a blog template and a blog+sidebar template.
Here are some Quick Facts:
Fully responsive Multilanguage support Full SEO support Optional Google Analytics Easily create new pages out of multiple predefined sections Lazyload the sections of a page [Group and update website-information into blogs] (blog, blog+sidebar) [Use tags to tag and group blog entries] (blog, blog+sidebar) [User-comments] (blog, blog+sidebar) [Create each page with or without sidebar] (blog+sidebar) Website-wide search by text or tags Password protect each page individually with sophisticated page-encryption with dummy texts and pixelated images
Just go to https://pwtemplates.de to test the demos (e.g. blog-sidebar) and purchase them for a small expense allowance.
Hope you like it!