Jump to content

gmclelland

Members
  • Posts

    565
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by gmclelland

  1. Hi @MilenKo, It's still rough, but feel free to read my notes on the different techniques for flexible page layouts https://docs.google.com/document/d/1peY-FUpevKgy87cKOxIVz8jwcv2-3c61zbiJr3QKO6c/edit?usp=sharing
  2. @Hurme - carefully read my explanation, I think it will fix your problem. If not, try posting the code you are using so that we can see what is wrong.
  3. @V7dev - I know this older, but did you figure it out? Another way you could probably do this via a custom module similar to how it's done in https://github.com/justb3a/processwire-twigextensions. Look at the FileExists Helper in that module.
  4. @Robin S - I would certainly be interested in seeing how that is done. I've always wondered how to search pages that are built in sections with Repeaters/PageTables/PageReference fields.
  5. https://serverpilot.io + https://linode.com works for me. Thanks for the other suggestions
  6. I'm not sure if we are talking about the same thing, but I remember having a similar issue. To get rid of that message, I had add this to my config.php // I receive a warning when visiting the admin area // Warning: your server locale is undefined and may cause issues. Please add this // to /site/config.php file (adjust “en_US.UTF-8” as needed): setlocale(LC_ALL,'en_US.UTF-8'); setlocale(LC_ALL,'en_US.UTF-8');
  7. I'm not fully understanding your question. Are you wanting to update the composer dependencies from within Processwire like the Processwire Upgrade module does? Ex. update a GoogleCalendar library to the latest version? Or.. Are you asking what is the best way to include a third party library within a module? In this case, I would advise NOT including the library directly in the module. Have the user install it separately via Composer. I like how Wanze did it in the new version https://github.com/wanze/TemplateEngineTwig One command ran by the user will download the third party dependency, update the composer.json, install the dependency in the correct vendor folder, and install the module in the correct Processwire modules folder. Here are a couple links you might find interesting: https://processwire.com/blog/posts/composer-google-calendars-and-processwire/
  8. WillyC is right. I forgot that I have that in mine as well.
  9. Change this line from: "<a href=''>Schváliť</a>", to something like: "<a href='{$page->editUrl}&modal=1' class='pw-panel pw-panel-right'>{$page->title}</a>", In my module that would open the page editor in a right side panel. You need to escape those characters in PHP. See https://phppot.com/php/php-escape-sequences/ Hope that helps
  10. Maybe you can use the truncate method https://processwire.com/api/ref/sanitizer/truncate/ ? // Truncate string to closest word within 150 characters $s = $sanitizer->truncate($str, 150); Here is another example of how to use a hook to add a "summarize" method to all the $page objects https://processwire.com/blog/posts/pw-3.0.28/ Here is reset https://secure.php.net/manual/en/function.reset.php Here is explode https://secure.php.net/manual/en/function.explode.php
  11. After reading the Processwire docs, check out https://www.pwtuts.com/ .
  12. Sounds pretty similar to a Drupal based module I just heard about. https://www.drupal.org/project/build_hooks and here is where I read about it https://weknowinc.com/blog/improving-drupal-and-gatsby-integration-drupal-modules Maybe that Drupal module would give you some more ui or functionality ideas?
  13. That could be an option. Although that would probably be my last option. I prefer to prevent the extra data from being loaded in the first place.
  14. So it seems like both Page Trees (the one at /processwire/pages/ and the one shown in the picture above) have an id = 3. So I guess you would somehow have to determine if the page is displayed in some kind of modal or not and then apply the hook or MarkUpPageTree? Does that sound right or even doable?
  15. Thanks @tpr and @Robin S! Your module update **very quickly** fixes the immediate problem with the breadcrumb trails and breadcrumb dropdown menu items when used with the MarkUpPageTree module. A little off topic to this thread now, but I would still like to modify the MarkUpPageTree module to only operate on the Page Tree on /processwire/page/. Do you know of any way to do that? Maybe only somehow autoload on page id = 3 or something like that? This is what I want to prevent. In the picture you can see the MarkUpPageTree module showing the template names in Page Tree Side Panel. I really only want to show that on /processwire/page/
  16. Just tested the new feature in 0.1.16. It worked great except I had to disable the MarkInPageTree module from https://github.com/benbyford/MarkInPageTree I use that module to include the template name floated to the right of the Page name when viewing the Page Tree. Ideally, I only want the MarkInPageTree's Page Tree modifications to only show when I'm on the Page Tree at /processwire/page/. I've tried modifying the MarkInPageTree module's autoload key to the following: using a selector string 'autoload' => 'id=3', and using an anonymous function 'autoload' => function() { if((wire('page')->template == 'admin') && (wire('page')->id == 3)) return true; else return false; }, as seen from Both didn't seem to work. The labels on the Page Tree stopped showing on /processwire/page Any idea of how I can get the MarkInPageTree module to only show when viewing the Page Tree on /processwire/page and not show in the breadcrumbs when the BreadcrumbDropdown module is enabled? I also don't want the MarkInPageTree module to show when the sidebar is opened and the Page Tree is displayed when clicking on the tree icon.
  17. The TracyDebugger module and Processwire was mentioned on the PHP Weekly email newsletter http://www.phpweekly.com/archive/2019-02-14.html - It was the last thing mentioned at the bottom.
  18. Thanks for sharing your module. For more exposure, you might want to submit a PR to https://github.com/wanze/TemplateEngineFactory to update the README.md under "Implemented Engines" to include a link to your module?
  19. @ryan Is the code examples correct on this page? https://processwire.com/api/ref/sanitizer/min/ https://processwire.com/api/ref/sanitizer/max/ It looks like it is missing the first argument in the function calls? $n is defined, but isn't used. Thank you for all your work in updating the documentation.
  20. Sorry flydev, I'm not sure about that?
  21. On mobile right now, but try Adrian's modulesettingsimportexport module. It allows you to export/import module settings. Works great for me.
  22. @horst There's also TracyDebugger's Diagnostics panel https://adrianbj.github.io/TracyDebugger/#/debug-bar?id=diagnostics that you can use.
  23. - Sorry if I wasn't fully clear. I meant to only left justify these elements on the mobile breakpoint/view when everything is vertically stacked. Above that breakpoint everything looks fine center justified.
×
×
  • Create New...