Jump to content

gmclelland

Members
  • Posts

    571
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by gmclelland

  1. @adrian The tracy debug bar takes up a lot of screen real estate, how about adding an option for collapsing the tracy debug bar by default into a "Debug" toggle link that shows fixed in the bottom right hand corner? When a user clicks the "Debug" link, it would show the entire bar. Currently a user has to refresh the whole page to bring back the toolbar if a user click's the "x" to close the toolbar. With a toggle link it can appear or disappear. Just a thought..
  2. Just curious, how are you using twig on your site? Are you using a module to do this?
  3. Looks like the latest version of TracyDebugger 3.5.1 always seems to show up in the backend even though it is unchecked in the TracyDebugger settings. PWDebugMode is off. 3.5.0 works fine. I'm on ProcessWire 3.0.45. Hope that helps
  4. I read up on latte and liked it, but Twig is so widely used in other CMS systems like Grav, Drupal 8, CraftCms, Bolt.Cm and others. It seemed better to invest my time learning something a bit more portable. Thank you for the suggestion though. I also like the Tracy debugger module. I haven't tried yet, but I wonder if that can be used with twig somehow?
  5. Thanks again @Wanze. Merry Christmas to you as well.
  6. I have a few more questions because I'm stuck 1. I need to install http://twig.sensiolabs.org/doc/extensions/index.html#extensions-install so I can use the truncate filter, but when I go to my site root and run composer require twig/extensions it will also load the latest version of twig as a dependency. This dependency conflicts with the version included in the TemplateEngineTwig module. Should twig be removed from the module and managed via composer only? If I then comment out the autoloader in TemplateEngineTwig module so that PW3 can just load twig from the site's vendor directory, I get the following Error: Exception: Unknown "truncate" filter. 2. Is the __() functions recognized? I get Error: Exception: Unknown "__" function when I try to use it. 3. If would be helpful if you can add documentation to module's readme.txt on how to load additional twig extensions, macros, filters? Thank you for any help you can provide.
  7. For me, MarkupSEO stopped working when I upgraded from 3.0.44 to 3.0.45. Here is the issue https://github.com/nicoknoll/MarkupSEO/issues/33
  8. Can't talk much right now, but this might help
  9. Yes, in your view's .twig file there is {% extends './partials/base.html.twig' %} Maybe in my view's .twig file I can just do the following? if ($config->ajax) { {# Load without header and footer #} {% extends './partials/ajax.twig' %} } else { {# Load with header and footer #} {% extends './partials/base.html.twig' %} } Or, maybe I need something like what is posted at: Anyways, I would still like to hear how other people are using this module with Ajax.
  10. Hello, I'm new to this. Can anyone tell me how to use a different Twig template when ajax is used? In some cases you only want the content without the header and footer. In other ajax cases you might want the content encoded as json. I'm not sure how to achieve this. if ($config->ajax) {...} By the way for anyone else wondering: This module works with PW3. To get the Twig dump function you will need https://github.com/justb3a/processwire-twigextensions and $config->debug = true; in your site's config.php file. You can use a _init.php to globally set twig variables for your templates. Just set $config->prependTemplateFile = '_init.php'; in your config.php and then $view->set('headline', $page->title); In your view's twig file you can print the variable with {{ headline}}
  11. Not sure if this helps, but the diffing reminds me of the popular https://www.drupal.org/project/diff module in Drupal. The 7.x version uses http://cgit.drupalcode.org/diff/tree/DiffEngine.php?h=7.x-3.x a file from phpwiki The 8.x version uses https://packagist.org/packages/mkalkbrenner/php-htmldiff-advanced
  12. I believe that was in Processwire 2.x. It's not in 3.x.
  13. In Drupal, that reminds me of the https://www.drupal.org/project/computed_field module. If you interested in something like that you can see how it works by spinning up a new instance at https://simplytest.me/project/computed_field/7.x-1.x and creating a computed field. I know they are totally different systems, but maybe ideas from one can be used on another?
  14. That's a good work-a-round. It worked. Thank you for all the help.
  15. I also tried this, but it didn't work either $field = new InputfieldURL(); $field->set('name', $this->attr('name')); $field->set('value', $this->attr('value')); $field->set('class', 'InputfieldAssistedURL'); $field->set('prependMarkup','<div class="InputfieldAssistedURLWrapper">'); $field->set('appendMarkup','</div>');
  16. Yes, that is what I noticed. To fix it, I thought about using this technique to keep the button next to 100% width input... https://boulderinformationservices.wordpress.com/2011/02/02/input-field-and-submit-button-on-the-same-line-full-width/ In order to do that, I need to add the div around the input field.
  17. Thank you @Robin S. Yes, that code I showed is coming from the render method. I tried your code, but it added a div around the input field and the button html tags. I'm trying to just add the div around the input html tag itself. My ultimate goal was to fix the styling of the module and submit a patch or PR back to the project. Here is the issue I'm talking about https://github.com/marcostoll/processwire-fieldtype-assisted-url/issues/2
  18. Thank you @Robin S. Sorry about that.
  19. Hello, I’m trying to add a div around an input field but can’t seem to get it. Can someone see what I'm doing wrong ? I don't get any errors, but the div isn't shown either when rendered. $field = new InputfieldURL(); $field->set('name', $this->attr('name')); $field->set('value', $this->attr('value')); $field->set('class', 'InputfieldAssistedURL'); $field->prependMarkup = '<div class="InputfieldAssistedURLWrapper">'; $field->appendMarkup = '</div>';
  20. @wumbo Can you publish this to the modules directory?
  21. Off topic...Hi @Sérgio, is there a way to prefill that Google custom search engine with query parameter? Like https://cse.google.com/cse/publicurl?cx=014789015761400632609:fxrf0rj4wr4?q=some+keywords That way I can add it to Google Chrome like they do here http://www.makeuseof.com/tag/create-custom-search-engines-google-chrome/
  22. I think https://github.com/horst-n/CroppableImage3 might be able to do something similar?
×
×
  • Create New...