Jump to content

gmclelland

Members
  • Posts

    565
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by gmclelland

  1. Sorry to hear. I use linode.com with https://serverpilot.io/ which allows you to switch php versions I'm using the similar TemplateEngineFactory and TemplateEngineTwig modules. Here is my cleanup-location-index.php Here is my cleanup-location-index.twig Hope that helps
  2. Do you have any initialization code included on the page? From my example site <script type="text/javascript"> $(function() { var mleafletmap1 = new jsMarkupLeafletMap(); mleafletmap1.setOption('zoom', 12); mleafletmap1.setOption('scrollWheelZoom', false); mleafletmap1.init('mleafletmap1', 32.5650134, -97.1253889, 'OpenStreetMap.Mapnik'); var default_marker_icon = L.AwesomeMarkers.icon({ icon: 'thumb-tack', iconColor: 'white', prefix: 'fa', markerColor: 'green' }); mleafletmap1.addMarkerIcon(default_marker_icon, 32.571438, -97.141617, '/cleanup-locations/cleanup-site-no.1-town-park/', 'Cleanup Site No.1 Town Park', '<br/><a class="button button-primary" href="/cleanup-locations/cleanup-site-no.1-town-park/">Register Now</a>'); mleafletmap1.addMarkerIcon(default_marker_icon, 32.568825, -97.135254, '/cleanup-locations/cleanup-site-no.2-katherine-rose-memorial-park/', 'Cleanup Site No.2 Katherine Rose Memorial Park', '<br/><a class="button button-primary" href="/cleanup-locations/cleanup-site-no.2-katherine-rose-memorial-park/">Register Now</a>'); mleafletmap1.addMarkerIcon(default_marker_icon, 32.568027, -97.134216, '/cleanup-locations/cleanup-site-no.3-hardy-allmon-soccer-complex/', 'Cleanup Site No.3 Hardy Allmon Soccer Complex', '<br/><a class="button button-primary" href="/cleanup-locations/cleanup-site-no.3-hardy-allmon-soccer-complex/">Register Now</a>'); mleafletmap1.addMarkerIcon(default_marker_icon, 32.566681, -97.122604, '/cleanup-locations/cleanup-site-no.4-julian-field-serenity-gardens/', 'Cleanup Site No.4 Julian Field-Serenity Gardens', '<br/><a class="button button-primary" href="/cleanup-locations/cleanup-site-no.4-julian-field-serenity-gardens/">Register Now</a>'); mleafletmap1.addMarkerIcon(default_marker_icon, 32.572479, -97.125290, '/cleanup-locations/cleanup-site-no.5-james-mcknight-park-west/', 'Cleanup Site No.5 James McKnight Park West', '<br/><a class="button button-primary" href="/cleanup-locations/cleanup-site-no.5-james-mcknight-park-west/">Register Now</a>'); mleafletmap1.addMarkerIcon(default_marker_icon, 32.575569, -97.120041, '/cleanup-locations/cleanup-site-no.6-james-mcknight-park-east/', 'Cleanup Site No.6 James McKnight Park East', '<br/><a class="button button-primary" href="/cleanup-locations/cleanup-site-no.6-james-mcknight-park-east/">Register Now</a>'); mleafletmap1.addMarkerIcon(default_marker_icon, 32.586960, -97.102921, '/cleanup-locations/cleanup-site-no.7-oliver-nature-park/', 'Cleanup Site No.7 Oliver Nature Park', '<br/><a class="button button-primary" href="/cleanup-locations/cleanup-site-no.7-oliver-nature-park/">Register Now</a>'); mleafletmap1.addMarkerIcon(default_marker_icon, 32.582439, -97.128456, '/cleanup-locations/cleanup-site-no.8-hog-pen-branch/', 'Cleanup Site No.8 Hog Pen Branch', '<br/><a class="button button-primary" href="/cleanup-locations/cleanup-site-no.8-hog-pen-branch/">Register Now</a>'); mleafletmap1.addMarkerIcon(default_marker_icon, 32.586273, -97.084381, '/cleanup-locations/cleanup-site-no.9-philip-thompson-soccer-complex/', 'Cleanup Site No.9 Philip Thompson Soccer Complex', '<br/><a class="button button-primary" href="/cleanup-locations/cleanup-site-no.9-philip-thompson-soccer-complex/">Register Now</a>'); mleafletmap1.fitToMarkers(); }); </script>
  3. Hi @Mike Rockett Are the scripts in the head? Are they loaded in the correct order? It's working fine for me at https://www.creeksidecleanup.com/cleanup-events/fall-cleanup-event-locations/ You can check the source for the correct order.
  4. I also had some interest in setting up a living style guide with Patternlab and Processwire using the TemplateEngineFactory module and TemplateEngineTwig module. I haven't gotten around to creating a custom module to add the twig namespaces. Here is where I explain the ideas behind it. There seems to be a lot of talk about it right now in the Drupal community.
  5. Hi @ryan, I just wanted to say thank you for the fantastic updates you've included. I recently had to export/import some pages from prod to dev for testing using the new module, and it all seemed to work magically. Great job! I'm looking forward to using this more.
  6. Here's the documentation on that http://processwire.com/blog/posts/processwire-3.0.43-core-updates/#new-filecompiler-options Without the /*NoCompile*/ it would probably cause unneeded additional processing. I think Processwire would also probably try to add namespaces to those third party libs which may cause random problems. The code above looks correct, I'm not sure why it is still compiling.
  7. Not sure how to help you, but you might be better off creating a TemplateEngineMustache module that extends the TemplateEngineFactory module: There is already sub modules created that you could look at for other template engines like Implementation of Twig: https://github.com/wanze/TemplateEngineTwig Implementation of Smarty: https://github.com/wanze/TemplateEngineSmarty Implementation of Jade (by dreerr, thanks!): https://github.com/dreerr/TemplateEngineJade https://github.com/dreerr/TemplateEnginePug I personally use TemplateEngineFactory with TemplateEngineTwig. Hope that helps
  8. @onjegolders Maybe you can try templates/views/ with the trailing slash? Also like Wanze is saying you need a php controller file in /site/templates/ and you need a .twig file to go with it. Ex. calendar-list.php and calendar-list.twig. In my .twig file I extend a base template with {% extends "./partials/one-column-layout.twig" %}. I like to keep my php controller files in the same directory as my .twig files so that I don't have switch between directories so much. @Wanze Did you happen to see my post above?
  9. For modules you could use the module toolkit module. Though it would be nice to have one place to go to export everything.
  10. Hi @Wanze, I'm interested in somehow adding twig namespaces. I'm not sure if it would be best to do this in a custom module via hooking initTwig, adding to this module, or the adding to the TwigExtensions module? The reason I'm interested in this is because I would like to use PatternLab(http://patternlab.io/) with Twig and Processwire. Basically I would like to use my PatternLab components created with Twig and include them within my Processwire Twig templates. The benefit is that you can have a styleguide that is always in sync with the website's templates. I would like to add something like @molecules, @organisms, and @atoms namespaces to specify what directory my Frontend twig components are located in. The components usually live under the PatternLab's directory in your site/templates/Patternlab/source/_patterns folder. This @styleguide namespace would allow me to easily change the paths to my components folders if they ever change. The new symfony.com also uses a @icons namespace to easily include svg icons. http://symfony.com/blog/refactoring-symfony-com-front-end {# Twig namespaces create concise and beautiful templates #} <i class="icon">{{ source('@icons/arrow.svg') }}</i> For background reading of why to do this: https://www.fourkitchens.com/blog/article/component-based-theming-drupal-8-video-series/ http://www.evanlovely.com/notes/pattern-lab/integrating-pattern-lab-into-drupal-workshop.pdf - good presentation that shows how your CMS needs to use the same twig namespaces as PatternLab and why https://www.drupal.org/project/components - similar Drupal module that allows creating Twig namespames https://www.mediacurrent.com/blog/component-based-theming-drupal-8 https://www.mediacurrent.com/blog/integrating-components-drupal-8-part-1 http://jordanpagewhite.github.io/drupal-8-front-end-architecture/ Implementation I'm thinking I just need to add a textarea field that allows the user to enter a namespace and the path to the twig templates on a new line separated by a delimiter of some kind. The markupSEO module doesn't this in it's config settings. To add the namespaces to Twig: According to https://twig.sensiolabs.org/doc/1.x/api.html, I think you can do the following: $loader->addPath($templateDir, 'admin'); //adds an @admin namespace I would love to hear anyone's thoughts on this. I really like working with Processwire and Twig, it really makes code so much cleaner and easier to read.
  11. @Macrura Sounds like something similar to the CraftCMS relations picker https://craftcms.com/features/relations in the video. Indeed, that would be good a feature for Processwire.
  12. What version of Processwire are you using? I think there was also an image upload issue with 3.0.61. Maybe try 3.0.62 dev? You can read the latest few commits here https://github.com/processwire/processwire/commits/dev Hope that helps
  13. I think I tried a quick test not to long ago to update the external libraries, and I believe I ran into the problem with the map not showing and javascript errors displayed in the console. I haven't had any time to investigate further.
  14. Ok, I got it. I deleted all the "repeater" references from the database and then uninstalled and reinstalled FieldtypeRepeater module without an error messages. I then was able to add a new repeater field with the option of adding additional fields to the repeater. Thank you everyone for helping me out.
  15. Yes, I mean one that I try to create via Setup > Fields > add new. Not import. So I uninstalled the FieldtypeRepeater module and reinstalling it gives me this message " Session: Module reported error during install (FieldtypeRepeater): SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'repeaters-2' for key 'name_parent_id'" I guess I now have to find where there is a duplicate row somewhere in my database that is causing the problem?
  16. Can you share the url so we can try it on our installs?
  17. Thanks @Robin S, good to know. The main issue is that I can create a repeater field, but I can't add any additional fields to the repeater field. It's missing the "Details" tab. When I edit the newly created repeater field, it shows the following message "Field: You must assign a template to the page before setting custom field values (title)" Any ideas as to what that could be? I wonder how I screwed up repeater fields? This is unfortunate because I was almost finished building the site when I had a need to use repeaters.
  18. Thanks @adrian, I'll check that out with the Tracy Debugger.
  19. Did you ever find a solution to this? I have a similar problem at
  20. Hmm... I also tried disabling and uninstalling all third party modules, but still doesn't work.
  21. Another thing I noticed is that the repeater field that is created doesn't ever show the "Details" tab when editing the field.
  22. The repeater field I created wasn't associated with an templates when I exported it.
  23. I also tried creating a repeater on a different site and importing it into my current site and this is the error I get:
  24. I deleted the contents of my cache table in the db and then refreshed on the modules page. Now when I go to create a new repeater, I get this message:
  25. I've tried multiple times, but when I try to create a repeater from the admin it gives the following error: Field: Can't save page 0: /processwire/access/roles/site-editor/for-field-158/: Pages using template 'role' are not moveable (template::noMove) [/processwire/access/roles/ => /processwire/access/roles/site-editor/] The field is saved, but doesn't allow me to add other fields to the repeater. Any idea on how to fix this problem? I have tried disabling modules, but still have the same problem. ProcessWire: 3.0.58 PHP: 5.6.24 Apache: 2.4.23 (Unix) MySQL: 10.1.8-MariaDB-log allow_url_fopen: 1 max_execution_time: 300 (changeable) max_input_nesting_level: 64 max_input_time: 60 max_input_vars: 1000 memory_limit: 256M post_max_size: 128M upload_max_filesize: 128M xdebug: xdebug.max_nesting_level: mod_rewrite: 1 mod_security: *confirmed off GD: bundled (2.1.0 compatible) GIF: 1 JPG: 1 PNG: 1 EXIF Support: 1 FreeType: 1 Imagick Extension: AdminOnSteroids: 1.4.1 EmailObfuscation: 1.1.0 FieldtypeAssistedURL: 1.0.0 FieldtypeLeafletMapMarker: 3.0.2 FormBuilder: 0.3.0 InputfieldAssistedURL: 1.0.1 InputfieldFormBuilderFile: 0.0.1 InputfieldLeafletMapMarker: 3.0.2 MarkupAddInlineScript: 3.0.2 MarkupLeafletMap: 3.0.2 MarkupSEO: 0.8.7 MarkupSimpleNavigation: 1.3.4 ModuleSettingsImportExport: 0.2.4 PageRenameOptions: 1.0.0 ProcessFormBuilder: 0.3.0 ProcessModuleToolkit: 0.2.3 ProcessWireUpgrade: 0.0.7 ProcessWireUpgradeCheck: 0.0.7 SchedulePages: 1.2.2 SiteTweaks: 0.0.1 TemplateEngineFactory: 1.1.1 TemplateEngineProcesswire: 1.0.1 TemplateEngineTwig: 1.0.4 TextformatterMakeLinks: 1.0.0 TextformatterOEmbed: 2.0.2 TracyDebugger: 4.3.1 TwigExtensions: 1.0.1 WireMailSmtp: 0.2.3
×
×
  • Create New...