• Content count

  • Joined

  • Last visited

  • Days Won


gebeer last won the day on January 2

gebeer had the most liked content!

Community Reputation

589 Excellent

About gebeer

  • Rank
    Distinguished Member

Profile Information

  • Gender
  • Location

Recent Profile Visitors

6,689 profile views
  1. Hello, I have a custom member user template with quite a lot of fields and would like to organize the fields of the profile edit page in tabs. I created tabs and they work just fine in the page edit screen. I enabled all the tab fields for the profile edit page in the ProcessProfile module Admin > Modules > User Profile. But on the profile edit page they do not appear as tabs. I found that wire/modules/Jquery/JqueryWireTabs/JqueryWireTabs.js and JqueryWireTabs.css do not get loaded on the profile edit screen. EDIT: even if I manually load in JqueryWireTabs.js and JqueryWireTabs.css, the tabs are not displayed. Is this intended behaviour or a bug?
  2. @tom0360 If you want more control over bootstrap and compile it yourself with SASS, I made a site profile which also includes some functions for rendering drop down menu and accordion:
  3. @Pretobrazza with the options markerLinkField and markerTitleField you can pass field names. The content of those fields on your page will be used as title and url within the marker popup. To apply the options you have to pass them to the render method <?php $options = array('markerIcon' => 'flag', 'markerColour' => 'purple', 'markerTitleField' => 'title',); echo $map->render($page, 'map', $options); ?> If you want to have additional popup content you can use the option 'popupFormatter' which is documented in the You can pull any content from any page and put it in the 'popupFormatter' option's callback function.
  4. @Pretobrazza It might be related to the jQuery version you are using. 1.11.0 is a bit outdated. You might want to try a newer one. My map is rendering fine on 2.2.4
  5. @Pretobrazza Did you also update the leaflet-markercluster files? Because the inputfield map is not using the marker cluster plugin.
  6. @Juergen In leaflet JS there is a method invalidateSize() which checks if the size of the map container has changed and then updates the map. When you call the UIKit modal, the size of the map container changes and therefore your map needs to be updated manually. So you need to listen to the event and attach a handler that updates the leaflet map. The problem here is that the map object is not easily accessible from the global document scope because the JS that renders the map is executed inside an anonymous function call. You should find a script like this just before the closing </body> tag: <script type="text/javascript"> $(function() { var mleafletmap1 = new jsMarkupLeafletMap(); mleafletmap1.setOption('zoom', 18); mleafletmap1.init('mleafletmap1', 49.572056, 10.878165, 'OpenStreetMap.Mapnik'); var default_marker_icon = L.AwesomeMarkers.icon({ icon: 'home', iconColor: 'white', prefix: 'fa', markerColor: 'darkblue' }); mleafletmap1.addMarkerIcon(default_marker_icon, 49.572056, 10.878165, '/maptest/', 'maptest', ''); }); </script> So if you try and get the map object with $(mleafletmap1), this will not return what you need. In order to have the map object available in global scope, you need to change some module code. You can find the changes at my fork in MarkupLeafletMap.module. Just copy this over your local file. Now the script before the closing </body> tag should look something like this: <script type="text/javascript"> var mymap; $(function() { var mleafletmap1 = new jsMarkupLeafletMap(); mleafletmap1.setOption('zoom', 18); mleafletmap1.init('mleafletmap1', 49.572056, 10.878165, 'OpenStreetMap.Mapnik'); var default_marker_icon = L.AwesomeMarkers.icon({ icon: 'home', iconColor: 'white', prefix: 'fa', markerColor: 'darkblue' }); mleafletmap1.addMarkerIcon(default_marker_icon, 49.572056, 10.878165, '/maptest/', 'maptest', ''); mymap = mleafletmap1; }); </script> And you can now access the map object in your script with Example code: <script> var myModal = $('#yourmodalID'); mymodal.on('', function(){; }) </script> While this is just a workaround it should help to display the map correctly. @Mats Maybe we should add something like this to the module code so in future versions a map object will be returned by default? Or do you see another way to access the map object with the module as is?
  7. @abdus As the $config variable inherits all methods and properties from WireData, you can try and use the set method $config->paths->set('assets', $config->paths->root . 'test/'); I don't have the time to try this right now. So give it a try yourself and let me know.
  8. @abdus ok, I see. When I echo $config->paths->assets in a template file I get '/DATA/htdocs/test. So it seems to be working and picking up the changed path from config.php.
  9. @abdus your code throws an error for me: `Uncaught Error: Call to undefined function ProcessWire\config()` And this code works ( note the $config instead of config() ): $config->paths->assets = $config->paths->root . 'test/'; $config->urls->assets = $config->urls->root . 'test/';
  10. @Pretobrazza I just installed latest version of this module on PW 3.0.47 I updated the getLeafletMapHeaderLines method for injecting JS and CSS then lines 168 and 173 to load @1.0.3. Then I got a JS error about the MarkerCluster. I updated all 3 files in the module's assets/leaflet-markercluster/ folder to the latest 1.0.4 versions. You can find them here: After that the map is showing up fine with no errors. Pls let us know how it goes for you.
  11. @abdus In the cheatsheet there is $config->paths->assets linked to from the API docs about $config. Haven't tried it but you should be able to override it like you did with $config->paths->files.
  12. @Pretobrazza trying to answer your questions: 1. As stated in the MarkupLeaflet.module file, you are required to add the link to leaflet.js yourself. You can change the version to 1.0.3. Then you also have to change the link to the leaflet css in the same file line 106. If you decide to use the getLeafletMapHeaderLines method for injecting JS and CSS then you need to change lines 168 and 173. 2. This module does not support wms layers out of the box. You would need to expand the JS logic to use them. Over at they have a tutorial on how to implement wms layers. The relevant code section in the module can be found in MarkupLeafletMap.js line 47. Following the tutorial on leaflet.js you might have to alter some other code in that file, too. 3. There is a shapefile plugin for leaflet.js that you could use to draw layers from your shape file. You can use the PW API and some PHP logic to create that shape file from the data in your pages, but I'm afraid this goes beyond the scope of this thread. This module is designed to draw markers of locations on a map where you can choose different map tile providers and assign custom fontawesome icons to your markers. All in all I think ProcessWire fits the job very well. But you might be better off just using the inputfield from this module on your pages to input the location data. And then setup the map rendering from scratch in your template file rather then using the render method that MarkupLeaflet.module provides. This should be easier than tweaking the render logic that this module provides. I can definitly encourage you trying to do this with PW and leaflet.js.
  13. Thank you for this very valuable piece of information. After implementing this in the head I still got a JS error: ReferenceError: config is not defined. I had to adjust the code like this to make it work: <script type="text/javascript"> <?php $jsConfig = $config->js(); ?> var ProcessWire = {config: <?php echo json_encode($jsConfig); ?>}; var config = ProcessWire.config; </script> No idea why my frontend form didn't pick up config from the ProcessWire object.
  14. @LostKobrakai thank you for clarifying. For me the original code did not work, even with the $event->replace = true part. That was why I was looking for a solution.
  15. This hook didn't work for me. Maybe something in the API has changed? Reading up on hooks that modify the return value, I found that only After hooks can modify it. I modified @Macrura 's code and this is working for me on 3.0.42 wire()->addHookAfter('Page::path', function($event) { $page = $event->object; if($page->template == 'landing-page') { // ensure that pages with template 'landing-page' live off the root $event->return = "/$page->name/"; } });