-
Posts
7,476 -
Joined
-
Last visited
-
Days Won
144
Everything posted by kongondo
-
Announcing Flutter Windows Alpha ? https://medium.com/flutter/announcing-flutter-windows-alpha-33982cd0f433 Flokk – How we built a Desktop App Using Flutter Windows fun with Dart FFI Flutter Client App for Aartos, Desktop + Mobile
- 35 replies
-
Or a hook like this? (not tested much). in site/ready.php $wire->addHookAfter('ProcessPageAdd::getAllowedTemplates', function (HookEvent $event) { $allowedTemplatesArray = $event->return;// normal PHP Array $allowedTemplatesWireArray = new WireArray();// create new WireArray() for sorting convenience $allowedTemplatesWireArray->setArray($allowedTemplatesArray);// populate the WireArray with data // whatever sort you want -> id, name, or multiple props, etc // maybe even a $int = $template->getNumPages(); ? PERFORMANCE ISSUES? (would require looping through all templates) $allowedTemplatesWireArray->sort('-id'); // sorting by ID DESC $allowedTemplatesModifiedArray = $allowedTemplatesWireArray->getArray();// get PHP Array back from sorted/modified WireArray $event->return = $allowedTemplatesModifiedArray;// give it back for passing to ProcessPageAdd -> buildForm() }); You could also use PHP's sort functions to sort the $allowedTemplatesArray but it is simpler to user WireArray sort instead ?.
-
Module Module: RuntimeMarkup Fieldtype & Inputfield
kongondo replied to kongondo's topic in Modules/Plugins
Yes, it's a known issue that I've never gotten round to fixing (although several fixes exist, a number of posts in this thread). I'll get to it at some point. Sorry for the pain. -
Hi @Eduard, Thanks for an excellent first post and welcome to the forums ?.
-
I don't know what this means :-). However, you can always get the raw date and format it as you wish. $dateUnformatted = $page->getUnformatted('date');// e.g. 1576236300
-
Moderator Note @franciccio-ITALIANO. I moved your topic to Dev Talk.
-
Dynamic Selects version 007 (released (23/09/2020)) Glad to announce that the latest release of Dynamic Selects is now available for Download/Purchase. Changelog Multilingual column labels (see screenshots/demos below). Repeaters and Repeater Matrix support (not tested Repeater Matrix though!). Selected Page/File/Image URLs (only supported in FieldtypeDynamicSelects for now). Thanks to @hollyvalero for request and testing ?. Various bug fixes. Screenshots/Demos Multilingual Column Labels Selected Image (in dynamic selects column) URL Selected Pages (in dynamic selects column) URL Thanks
- 96 replies
-
- 1
-
- chained-selects
- dropdowns
-
(and 2 more)
Tagged with:
-
I would love to see a screenshot please as I am not sure I know what you folks are talking about ?. Thanks!.
-
This comes from WireUpload.php, here as result of PHP error described here. You could perhaps use try catch blocks to customise notices.
-
Yes, it has always been like this since I can remember. I don't think this is a ProcessWire issue, but a CKEditor one. So unless they fix it on their side, a new version will not help unfortunately.
-
Nope. It's never been possible. You must be confusing this with something else. Nothing to do with ProcessWire. Many (most?/all?) languages have variable scope. $config is outside the variable scope of myfunction(). myfunction() doesn't know what config is. You have to tell it. Having a namespace declaration has nothing to do with it. namespace ProcessWire; // alternative 1: use the global wire() function - @see: https://processwire.com/api/ref/functions/wire/ function myfunction() { echo wire('config')->paths->assets; // no error } // alternative 2: pass in $config function myfunction2($config) { echo $config->paths->assets; // no error } alternative 3: functions API - e.g. https://processwire.com/api/ref/functions/config/ @see also: https://processwire.com/api/ref/functions/
-
Unless you have changed your _init.php or something in this file has changed since I last checked, this is redundant/verbose since the _init.php that ships with ProcessWire already includes _func.php // Include shared functions include_once("./_func.php"); Why not put them in a .css file? Hard to read this crystal ball without some sort of clue please? What errors are you getting? Are you using this skyscrapers-profile?
-
Glad you got it sorted! Are you able to elaborate more so we can all learn from it? Thanks.
-
Did you confirm file permissions are OK after the restoration? The restoration could have run as a user in a different user group? Is ProcessWire able to read and write where it needs to? Check the server errors logs for more details about what 'this resource is'. What file/folder is it pointing to?
-
@AndZyk are we going to see this in the showcase? :-)
-
No worries...but no need to apologise though ?. It's just a 'community' recommendation not a rule.
-
@Roych The menu you want cannot presently be achieved by using the render() method. For instance, looking at your <li> tags, going down the levels/depth, they have different classes. This is currently not possible in MB but I will add it to my todo list, e.g. a 'levels class'. For custom menus such as yours, it is better to use the getMenuItems() method together with a custom recursive function. Below is an example recursive function that will output the example menu you provided. You can adapt it to your needs if you find it useful. It might need a bit of polishing.
-
@webhoes it is recommended to use the spoiler tags to wrap very long text. I've done this for your post above. Thanks.
-
@Roych. OK. Thanks. I'll have a look.
-
I thought this was the output from echo $menu->render(1022, $options);, hence the confusion. In that case then, please post the 'messy/broken' output that results from echo $menu->render()....
-
Probably. Please copy paste here the original menu HTML that you are trying to replicate.