Search the Community
Showing results for tags 'render'.
-
Process Render File A Process module that renders markup from files in /site/templates/ProcessRenderFile/. This provides an easy way to create simple admin screens where it might be overkill to create a dedicated Process module for the purpose. Process page When you install t...
-
Hey folks, I have a question regarding rendering of template files that are in a subfolder of the template folder. How would I for example render these PageTable items, when their template files are inside templates/blocks/: <div class="grid"> <?php foreach($page->grid_ext as $item):...
- 8 replies
-
- render
- delegated template approach
-
(and 2 more)
Tagged with:
-
<?php namespace ProcessWire; $form = $modules->get('FormTemplateProcessor');$form->template = $templates->get('book-now'); // required $form->requiredFields = array('title', 'email', 'number','body'); //$form->email = 'your@email.com'; // optional, sends form as email $form->parent = $page('tem...
-
Hello everyone! I am new to Processwire and really like it, but now I have a problem that I can't solve by myself. I have created following templates: data_people (no template-file) person_listing (person_listing.php) person_detail (person_detail.php) I have added the following P...
-
I'm displaying a list of products which are found by their templates, but the pages are taking a very long time to load. At first, I blamed it on my image rendering (using PIM2), but even with all those images now stored in the file tree, the page is taking abysmally long to load. ProCache seems to...
-
I've written a hook which replaces the page::render method. Based on a few conditions, I might want to output something different from what page::render would return. So when my conditions aren't met, I want to use the return value of the original page::render method. How can I do this?...
-
Hi there I want to render a page in a particular language, somehow like $page->render('de'). How can I achieve that? Some background information to my problem: I wrote a module that generates HTML newsletter emails. From the PW backend I use that module to send emails, which are represente...
-
How can I change the output of `Page::render`? I've created a hook before page::render, but when I set the $event->return to something else, my whole page is replaced with that value. For example: public function beforePageRender(HookEvent $event) { $event->return = 'blaat';...
- 10 replies
-
- page::render
- render
- (and 4 more)
-
Hello, I need to add some markup to checkbox inputs of page fields in the admin forms for which I created an autoload module with $this->addHookBefore('InputfieldCheckboxes::render', $this, 'renderCheckboxes'); The renderCheckboxes method aims to replicate, extend and then replace the or...
- 5 replies
-
- inputfield
- render
-
(and 1 more)
Tagged with:
-
Hi guys.. I was wondering.. How do I render or output simpel <input> markup?? The list output that InputfieldForm makes is tomutch.. Im loading a template (without file) and I want to output the same fields as a form in the frontend.. Thanks for all your work...
-
For some reason when I unpublish an already-published page, even of a template other than the specified 'importer', all its fields are cleared on page render. How do I understand and remedy this? Peace & thanks public function init() { $this->addHookAfter('Page::render', $this, 'renderEditor...
- 5 replies
-
- processpageedit
- render
-
(and 2 more)
Tagged with:
-
Hello, I want to know, is there any chance to render only visible fields based on their Dependencies? For example, I have many fields in template with conditional logic. But all their values stored in DB, and render in loop with $page->$fields. I could duplicate logic in PHP, but It's seems ve...
- 5 replies
-
- Inputfield
- conditional logic
-
(and 3 more)
Tagged with:
-
I have the problem that i cant render a fredi link to a page which i choosed from a pagefield from a user. i have a user called "test-user". This "test-user" template has a pagefield called select_organiser which contains all the organiserpages. My approach: $organiser = $user->select_organise...
-
Hi, I'm working on a homepage template where I loop over some pages, check if they have children, and print their children; if not, print the page itself where I employ page->render function. Inside template files of these parent pages, I use $config->scripts->[foot|head]->add() to enqueue scripts...
-
Hi, I'm working on a custom contact form and I want to create an HTML markup for email body. After tedious and long searches I've found wireRenderFile function that does exactly what I need. Pass in template file and variables to use, it returns the output. Except that it doesn't. It simply returns...
- 2 replies
-
- wireRenderFile
- render
-
(and 1 more)
Tagged with:
-
In my home.php (a template, as you'd expect for the homepage) then I take a look at the URL segments. I want to provide some shortlinks, e.g. example.com/php redirects to example.com/languages/php/. That all works. But if I want to display a 404, by using "throw new PageNotFoundException();" then th...
-
Hello everyone. I've found PW recently and I've been exploring/testing it... The everything is a Page is slowly sinking in. I'm currently trying to render a page in another (like a partial) like below: $shop = $pages->get('/shops/mr-big'); $mainContent = $shop->render('partials/shop-intro.php...
-
I am creating a module that sends pages as en email. I use ->render() to get the content of a PW page and send it as the body of the mail. But something is wrong and I am running out of memory (currently set to 100 MB). This function checks, if there is a page flagged for sending. $mailtempplate i...