-
Posts
68 -
Joined
-
Last visited
Everything posted by abmcr
-
Thank you
-
Hello Marco: in the code there is no instruction for restrict the field only to super user... What happens for a no super admin?
-
Yes! But my question is not about Processwire and Builder (as Repeater Matrix), but in general talking about the approach of building website with page builder. In processwire an approach like builder is made with repeaters etc... but i have interest about your opinion in builder approach
-
What you think about visual builder approach? in the wordpress ecosystem the Gutenberg project, the DIVI theme ecc are commons... for the client may be useful a toy as a visual builder... Thank you
-
This is a old question,but i want rebuild the discussion. I don't know drupal, but PW is reale a good cms. Drupal is better? the UI for final user is very complex... PW as an UI simple and clear.. drupal is symphony based... but PW as a clear and powerful API... thank you
-
Bravo!!!! Very very beautiful; i have buyed the module a year ago.... and it work very well. The new ProcessWire 3 UI seems perfect.... Do you release a beta?
-
Thank you very useful
-
https://github.com/processwire/processwire-requests/issues/156
-
Thank you
-
I have a field FileType named allegato into a repeater named documenti I want to retrieve the value of the field allegato for all pages for creating a custom field module; Into the module i have this code foreach($output->documenti as $item) { echo "PRINT ALLEGATO"; var_dump($item->allegato); echo "PRINT ALLEGATO -> count"; //this line echo the count as 1 var_dump($item->allegato->count); echo "PRINT ALLEGATO -> items"; /(/this line get NULL.... WHY? var_dump($item->allegato->items); echo "PRINT ALLEGATO -> url"; var_dump($item->allegato->url); // this line get me the url ... without the name of the file ???? echo "PRINT ALLEGATO -> description"; var_dump($item->allegato->description); //this line get me null though the value exist in the table (see image below) The result is where i show only one row (id 2003). Why i am not able to retrieve the value of $object->items?? And why $item->allegato->url show a partials url of the attachment and $item->allegato->description print null??? the same code into a single template work fine and output the correct values Thank you in advance
-
very simple.. thank you
-
There is a way for change the label "Children" (see attachment) only for a template? In the hook https://processwire.com/api/hooks/captain-hook/ i have not found a hook for made this.... The idea is $pages->addHook??????('?????', function($event) { $page = $event->arguments[0]; if($page->template->name == 'my-template') { //rename the label children Thank you
-
May be another problem: i have a ckeditor into a repeater and the drag and drop into the editor don't work; in the same repeater there is an images fileds.
-
[Solved] Search text into field included in repeater
abmcr replied to abmcr's topic in General Support
Your code work fine! Thank you $matches = $pages->find("testo|pagina_blocco.testo~=$q"); -
I have a field named"testo" (textarea) included in various templates (home, page, post) ; in one of these the template (post) the field "testo" is an input of a repeater field named "pagina_blocco". If a search a word this selector //$q is the search word $matches = $pages->find("testo~=$q"); the selector get the text only if the "testo" field is not included in the repeater, ie only in the home and page template but not if the word is in the field when this is included into the repeater. I have try with a simple SQL directly on db SELECT * FROM `field_testo` WHERE `data` LIKE '%ente%' and this query find 2 rows: but only the row corresponding to a page The 2 pages founded by query And the corresponding templates: the id 61 is a repeater But in the search page only the pages_id=1 is showed by the selector. If i edit the selector in $matches = $pages->find("testo~=$q,template=home|repeater_pagina_blocco14") the search find also the second row , but in the matches result the ID of page in witch the repeater are included is not present..... How it is possible to search into a field included in a repeater? Obvious it is possible with a series of query from the db.. but this is not PW style Thank you
-
Integrating working "required if" conditions in repeater
abmcr replied to Juergen's topic in Wishlist & Roadmap
Hello. I have the same problem: i want to require a filed into a repeater.... an hook?... do you may put a simple approach? I have try with this not working code into ready.php $wire->addHookAfter('FieldtypeRepeater::savePageField', function($event) { $items=($event->arguments[0]->links_utili); foreach ($items as $key) { if (empty(trim($key->title)) || empty(trim($key->url_link)){ //i need to remove the field and show a warning message } } }); I have a repeater named links_utili with 3 fields: title, url_link, active and i want to require url for each title This is the correct approach or is better to implement $this->addHookBefore('Pages::save', function(HookEvent $event) Thank you -
Thank you for the response. this is not really what i need to create because the focus is building a veritable CRUD admin interface for existing tables
-
I need to manage,from PW, differents tables with relations. I need create a custom module with a backend form for manipulate (CRUD) data. There is an existing open source module for learning? Thamk you
-
Thank you; the code work fine...simply!
-
foreach($page->images as $image) { echo "<img src='$image->url'>"; } With this code i get all images of a field; but how randomize the order? Thank you
-
I need retrieve a list DISTINCT of values of a field (city) in a selector. now i have create a foreach Cycle for get the pages $arr=array(); $p=$pages->find(...); foreach($p as $el){ $arr[]=$el->city; } //now unique... But there is a most efficient way? thank in advance
-
On page->template there are non exisiting repeater fields
abmcr replied to Beate's topic in General Support
this solve the problem -
[SOLVED] BUG : Repeater fields appears in template settings of any page
abmcr replied to abmcr's topic in General Support
Yes this fixes the issue. Thank you very mutch