Jump to content

gmclelland

Members
  • Posts

    565
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by gmclelland

  1. 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.
  2. 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
  3. Can't talk much right now, but this might help
  4. 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.
  5. 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}}
  6. 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
  7. I believe that was in Processwire 2.x. It's not in 3.x.
  8. 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?
  9. That's a good work-a-round. It worked. Thank you for all the help.
  10. 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>');
  11. 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.
  12. 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
  13. Thank you @Robin S. Sorry about that.
  14. 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>';
  15. @wumbo Can you publish this to the modules directory?
  16. 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/
  17. I think https://github.com/horst-n/CroppableImage3 might be able to do something similar?
  18. I haven't tested it on a phone/tablet, but I wonder if we can use the existing system to work better on mobile. How it could work: Click a page title in the tree - Links expand showing "Edit, View, New, Move" Click "Move" - it shows "Click another page title to show the moving options" Navigate to and click on a different page title in the tree - it shows "Move below, Move above, Set as parent" Maybe then we wouldn't need the drag and drop javascript?
  19. Here is some interesting ways that the Modx CMS is AMPifying their content https://www.sepiariver.ca/blog/modx-web/amp-ify-your-modx-site/ Here is how Wordpress seems to be handling it https://code.tutsplus.com/tutorials/installing-amp-in-wordpress--cms-26272
  20. Silverstripe - https://www.silverstripe.org/ also does a good job with this. Here is a quick screencast. I wonder though if these are usable on mobile / tablet? silverstripe.mp4
  21. Thanks tpr, but I don't think that is obvious enough. If we rely on drag and drop we will have to explain/train our users on how to use the user interface. IMHO.. I'd rather have a simple button that pops up a modal that includes a standard file chooser input field in case the user just wants to select a file and doesn't want to drag and drop.
  22. Thanks tpr, I created an issue on github for those who would like to follow along. https://github.com/ryancramerdesign/ProcessWire/issues/2047
  23. Hi tpr. Feature Request: If possible one thing I would like to see is better consistency for replacing files in file and image fields. This is a task that content editors have to do constantly, so I would like to make it dead simple and obvious. Here is some quick mockups: For image fields: When the "Replace Image" Button is clicked, a modal dialog pops up. For File Fields: Same thing...It opens a dialog to replace the file Any thoughts?
×
×
  • Create New...