-
Posts
66 -
Joined
-
Last visited
-
Days Won
1
Everything posted by markus-th
-
[SOLVED] How to create a custom label for each repeater?
markus-th replied to Boost's topic in General Support
- 1 reply
-
- 3
-
Also tested it ... wow that's awesome. Phrase: how to add a new field to a processwire template via api To add a new field to a ProcessWire template via the API, you can use the $fields->save() method. This method allows you to create a new field and add it to a template using a PHP script. Here is an example of how this could be implemented: // Use the Wire class to access the ProcessWire API $wire = Wire(); // Get the fields and templates modules $fields = $wire->fields; $templates = $wire->templates; // Create a new field $field = $fields->newField(); // Set the name and type of the field $field->name = 'my_field'; $field->type = 'text'; // Save the field $fields->save($field); // Get the template to which you want to add the field $template = $templates->get('my_template'); // Add the field to the template $template->fields->add($field); // Save the template $template->save(); In the example above, we use the $fields->newField() method to create a new field, and then use the $fields->save() method to save the field. We also use the $templates->get() method to get the template to which we want to add the field, and then use the $template->fields->add() method to add the field to the template. Finally, we use the $template->save() method to save the template with the added field. Note that this is just one way to add a new field to a ProcessWire template via the API. There may be other approaches that could work as well.
-
Custom image fields data get lost in nested repeaters
markus-th replied to dec3's topic in General Support
-
Custom image fields data get lost in nested repeaters
markus-th replied to dec3's topic in General Support
I have the same issue. Maybe @ryan can help with that? -
Live Server is not suitable, because it cannot parse PHP or establish a database connection. I would recommend you to work with XAMMP (or MAMP for Mac) for local development.
-
This work in my case whithout any problems $wire->addHook('/existing-page/([0-9]+)', function ($event) { $id = $event->arguments(1); $post = $event->pages->findOne("template=product, id=$id"); if ($post->viewable()) $event->session->redirect($post->url); });
-
UrlSegments with Pagination is throwing blank page [SOLVED]
markus-th replied to Martinus's topic in API & Templates
Just try <li><a class="dropdown-item" href="<?= $page->url('name-asc') ?>">Name (A-Z)</a></li> instead of <li><a class="dropdown-item" href="name-asc">Name (A-Z)</a></li> This should fix the link -
UrlSegments with Pagination is throwing blank page [SOLVED]
markus-th replied to Martinus's topic in API & Templates
This link simply adds "name-asc" to the end of the actual URL. But you have to switch between "name-asc", "name-desc" etc. For this you have to specify the complete url https://processwire.com/api/ref/page/url/ -
Refresh translations json - Can't add strings
markus-th replied to sgpcreativa's topic in General Support
Have you tried to remove the template in the FileCompiler-Folder? You find it here: /site/assets/cache/FileCompiler/templates -
UrlSegments with Pagination is throwing blank page [SOLVED]
markus-th replied to Martinus's topic in API & Templates
That is okay, and i use it always like this. But your sorting-HTML is not in this template ... this is only the pagination. -
UrlSegments with Pagination is throwing blank page [SOLVED]
markus-th replied to Martinus's topic in API & Templates
I mean the template that generates the HTML of the sortinglink. -
UrlSegments with Pagination is throwing blank page [SOLVED]
markus-th replied to Martinus's topic in API & Templates
How look the output? I think the generated sortinglink ist wrong. -
You can use the URL-Hooks. https://processwire.com/blog/posts/pw-3.0.173/ I think this should be the simplest solution.
-
Keep getting logged out, regardless of settings
markus-th replied to Goca's topic in General Support
I even use Cloudflare on the most of my sites and had the same issues. Since i use $config->sessionFingerprint=false; everything works fine. Maybe you have to use false instead of 0? -
-
Try this as Operator: ~%= or ~*= I use this on all my sites with the AjaxSearch module, but it should work here as well. Here you can find Ryan's blogpost: https://processwire.com/blog/posts/pw-3.0.160/
-
-
Thanks for the tipp, it is already done in https://www.dothiscookingthing.de/rezepte/ and the Categorypages ... but I forgot the homepage-listing
-
Thanks. Yes. RepeaterMatrix is awesome and save so much time. Since I'm using it I have to use a lot of templates less than before. The SEO texts I mean are just small teasers at the categories and ingredients. The recipes should not be filled with unnecessary content. The recipes have a JSON-LD markup and are also already displayed correctly as a recipe e.g. on Google Nest Hub.
-
Yes, that is right. Here is some on my to do list
-
One of my first projects with ProcessWire. Online for a while, but still up to date and currently new features are being developed again. The most interesting feature of the site is the integration of the external tool and the PDF creation of the registration form with integrated API connection to always be able to directly output the most current dates. External Service: SEMCO ( https://www.semcosoft.com/de/ ) Used Modules: HannahCode Pages2PDF AIOM+ MarkupSitemap XML and some others In Development: Shop with Padloper Site: https://www.school-dynamic.de/ At this point I like to say Processwire makes it so easy for me to solve even more complicated tasks and get impressive results. Because I must confess, my PHP skills are unfortunately not yet where I would like to be.
-
Thanks, good idea. The smiley and the sofa are described in the sidebar ? Dishes with a smiley are good for cooking during the week, after work. While "sofa-dishes" may take a while and are better for weekends.
-
Thanks a lot ☺️ I can show you the structure of the recipe template. Here are all accordions open. Tags are reference fields for the categories as well as the ingredients that are used as reference for individual ingredient pages. New categories and ingredients are created automatically when you enter the recipe. Especially with the ingredients there is still a lot to do, because the individual pages (e.g. https://www.dothiscookingthing.de/zutaten/balsamico/ ) should still get texts and images. Maybe also a bit of SEO texts. ?
-
My wife loves to cook, and I always like to further my knowledge around Processwire. So I thought I'll build a small page with the some small function to learn something. Used modules: ProMailer RepeaterMatrix Pages2PDF AIOM and some other litte modules Current functions: JSON-LD for recipes and page search Automatic ingredient calculation when changing the number of servings Creation of a PDF of the recipe Basic PWA (here is something to do, actually) Planned functions: a lot ? Site: https://www.dothiscookingthing.de
-
Thanks for this terrific feature, I will be able to use this directly on one of the next projects as a short link for QR codes on products. This will save me so much work.