
Cybermano
Members-
Posts
87 -
Joined
-
Last visited
-
Days Won
1
Cybermano last won the day on January 27
Cybermano had the most liked content!
Recent Profile Visitors
The recent visitors block is disabled and is not being shown to other users.
Cybermano's Achievements

Full Member (4/6)
48
Reputation
-
Thanks @monollonom, it looks very interesting. I will surely give a look and try.
-
Hi @bernhard, thanks for your explanations. I will made my best trying to follow those suggestions.
-
Cybermano started following PrevNextTabs , Turn Your Boring ProcessWire Emails into Beautiful Masterpieces! 🎨 , Inputfieldtextarea: saved html table loses data attributes and 3 others
-
Thanks @bernhard in past I have used Cerberus as mentioned by @Jonathan Lahijani, but MJML is very awesome; expecially for the VScode extension with the html compiler. and preview. I think the template could be used directly in the wire mail construct, (without the ready hook): // ... $m->bodyHTML(wire()->files->render($layoutFile)); // ... Or do you think this is not a good practice? Now I'm testing it dynamically with "placeholders" : // get template $bodyHTML = wire()->files->render($layoutFile); // let's say we have 2 placeholders into the html template: one for user name as [[userName]] and one page body content as [[pageBody]] $bodyHTML = str_replace( ["[[userName]]","[[pageBody]]"], [ucfirst(wire('user')->name),$page->body], $bodyHTML, ); // ... $m->bodyHTML($bodyHTML); // ... This works for me: it has great potential. Many thanks again for sharing this solution.
-
Inputfieldtextarea: saved html table loses data attributes
Cybermano replied to Cybermano's topic in General Support
Hi @Gideon So, I'm back. I've tryed the RTE type, but they didn't fits for my needs: CKeditor cuts the table in the inputfield layout (instead to display my table with 100% and responsive classes), while TinyMCE didn't display anything. So I turned on the simply textarea. I'm still amazed by the different behavior for rendering the delayed output of the two kind of table in two inputfields of same kind and with same configuration: Case A I pass an AdminDataTableMarkup from a custom function by a variable ( $output .= ... ) and this table is rendered with right attributes (eg. the id) Case B I pass a custom html table in the same way, but no id is stored... (i need to pass id or other attributes as classes, with much more effort to pass right data to ajax calls and response actions). Only "cellpadding" and "cellspacing" remains. -
Inputfieldtextarea: saved html table loses data attributes
Cybermano replied to Cybermano's topic in General Support
Hi @Gideon So, thanks for your reply. Currently no RTE is setted: in past the same config didn’t broke the data attributes (but with AdminDataTableMarkup call, not simple html table tags). I will try to set almost one RTE and let you know. Many thanks in advance. -
Hi. I’m using an Inputfieldtextarea to store an html table in a page (admin side), populated by hook using custom markups (no AdminDataTables). This field is setted without textformatters, accepting html/markup content and with open and locked visibility (to render properly the html structure). In this table, all the data attributes of any tr/td (but also other tags such as a links or button, div etc.) are removed from the html and only classes remain in the code. Maybe I’m missing something, but I’m stuck with this behaviour. Anyone has any idea? I searched similar topics in the forum but with no luck… PS I would use data attributes to speed up js/ajax events and keep code cleaner.
-
Very cool! As for all the improvements. Big thanks to all! Maybe, could be this filtering setted into the parent template also for children fields/subfields? Like the override page label ( {fieldA} - {fieldB.subfield} - {title} ).
-
Hi everybody. I was playing with the @Macrura PrevNextTab module, (forking it); but actually I started from here, adding previuos and next action (with logics) to the Save button, as suggested a while ago by @bernhard. Every time I’m annoyed by the boaring "There is no editable next page to edit." after "Save + Next" click: so I decided to implement a "stop" when reached the last item (and same way for previous when reached the first one). This is the results for First and Last items dropdown menu of the Save button: I would like to share the code to put into ready.php, if somebody find it useful: Bye.
-
Hi @Macrura, thanks for this module. I have played a bit and found it useful, but at first time not very friendly. I try to explain... The Next/Prev links seems like to be in "loop" when at last/first items; I feel it quite unfriendly and not very helpful. When lot of siblings are present, it's difficult to understand if we are at the beginning or ending to stop editing/checking pages (for example, I find very annoying when you click on "Save + Next" and only then the message "There is no editable next page to edit." appears...) But your work is very intersting, so I tried to edit your code (I forked it from your repo and pulled a request). Basically, I think that if the next or prev page id is "0", so we can decide to hide the relative links and show First/Last, as needed. I added few code lines into your module to implement last and first placeholders and labels, new logics into .js file to check ajax response (ids and urls) and few rules into .css file. Also added a condition to hide links if only one items is present (so no navigation needed). Currently I tested all only in Tabs, and all works fine. Hope this could be helpful. I think I will try to insert also a link to parent page (just to complete a full nav "scheme"), and maybe to go further and finish the editin also for UI specific settings. PS This idea was initially born implementing new actions for Save and Next admin button (see here the post).
-
Hi @torf, thanks for sharing that.
-
Or maybe this edited code of your first post works? $map = $modules->get('MarkupLeafletMap'); echo $map->getLeafletMapHeaderLines(); $mappoints = new PageArray(); foreach ($page->map_repeater as $point) { $mappoints->add($point) // the repater is a page } echo $map->render($mappoints, 'your_map_field_name', array('height' => '270px')); ?>
-
Hi @torf, maybe I didn't get it at all or maybe I didn't explain well my idea. So I'll try again... 😉 Surely I could be wrong, but for me a PageArray is not only for admin side, but all the pw pages collected into a php variable created with pw selectors in a script file. For shortness I have created 2 pages with two repeaters each (repeater name is "multipoints"), with a title and a leaflet map field (named 'fm_mappa') into. This is the simply code for testing. Please note that I didn't get the repeater with a foreach statement, but with a pw search with a selector for all the templates with name equals to "repeater_NAMEOFTHEREPEATER", as pw builds. Obviously into your selector you can build your search to the desired points, e.g with sorting or something other. echo $pagesWithMultipointsRepeater = wire('pages')->find('template=repeater_multipoints'); if (count($pagesWithMultipointsRepeater)){ $map = $modules->get('MarkupLeafletMap'); $options = array( 'height' => 800, 'markerColour' => 'red', ); echo '<div class="g-mb-25">'; echo $map->render($pagesWithMultipointsRepeater,'fm_mappa',$options); echo '</div>'; } The numbers before the map are the repeater ids (note the "echo" on the first line of the code). And these are the admin pages: I hope that's clearer.
-
Hi @torf Never used Leaflet Map with repeaters, but in past I had to collect lot of points into a single map. I simply used a PageArray with wire('pages')-find('template=MY_TEMPLATE, and so on...') and then I passed the PageArray to the $map->render($MY_PAGE_ARRAY, 'MY_MAP_FIELD', $options); it works. So I suggest to collect your points in a PageArray with proper selectors. Don't forget that your repeater has a template, and if useful you can get the parents of them. Let me know if this solution can fit your needs.
-
Please, note that in the last linked repository your "jk_publish_until" field still has a "none" output format (instead of a [d-m-Y]), that causes a parsing date issue. Furthermore I found a little misunderstanding the unpublish description in scheduled plan if the page will be moved in new parent: this page will be remain unpubilshed? It seems no: the page will be unpublished from it's first parent, but it will remain published in the new one. So the page will not be unpublished at all. Or am I wrong?