Jump to content

mdp

Members
  • Posts

    8
  • Joined

Everything posted by mdp

  1. Thanks for the instructions on how to fix this issue. I had installed Lister Pro and deleted the Find. Then I got the "unrecognized path" error for the template. Once I recreated the Find page, everything was back to normal. So as of 2/16/2019, on ProcessWire 3.0.101, this is still an issue.
  2. Hi Bernhard, Thanks for the info and the links to jQuery tutorials. I haven't had to learn jQuery yet for any prior projects, but it will be very useful for my current project. The site I'm building is a resource directory of information for teachers in higher education. I'm trying to keep it as plain vanilla as possible, because I will need to hand it off to someone else in the future and I won't know who that person is or what their skills will be. It's a risk doing it on Processwire instead of Wordpress, which is what I was originally planning to use, but PW is just so much better. And now that I've found it, there's no going back. The project got so much easier with ProcessWire, even with the time I've put in to learn the API, build my own php templates, etc. It's definitely worth the effort. Best wishes, mdp
  3. Hi MoritzLost, Thank you so much for explaining the jquery! That's very helpful. And I usually do close the option tags, but I noticed that on the processwire site, they weren't included. So I wasn't sure if there was a new ways of doing things. Or maybe the code I copied from the site (using the Inspect tools on Chrome) clipped them off? Anyway, I agree it's good to always close the html tags. As to the submit button, that's a good idea. And definitely much easier and cleaner. I've done sorting and filtering before using the submit button. But for this project, it has to work without a button. I'm new to jquery, and your explanation about the class and id has cleared up my confusion. Best wishes, mdp
  4. Hello PW Friends, I'm building my first ProcessWire site, having made the leap from WordPress, and all I can say is WOWWWW!!! ProcessWire is fantastic. Thanks to all of you for your wonderful work and dedication. And especially to Ryan. The site I'm working on has a lot of structured data and needs to scale, and this cms will make my job so much easier. And without all the plug-ins! It's the perfect tool for the job. I'm basing my site on the Skysraper profile and need to use the 'sort' feature. I'm using the code from the 'syskraper-list-sort.php' file, which is in the 'includes' folder (pasted below). The select control has the id 'skyscraper-sort-select' and the class 'sort-select'. The skyscraper.js file is looking for '.sort-select'. It is different on the page http://modules.processwire.com/modules/?sort=title. Will the skyscraper.js file code trigger on whatever is called 'sort-select', either the class or the id? Is there another way to handle the sorting that would be the preferred method? Many thanks, mdp <form method='get' class='uk-form sort-form'> <label for='skyscraper-sort-select' class='uk-text-muted'> Sort: </label> <select id='skyscraper-sort-select' class='sort-select'><?php foreach($options as $value => $label) { $selected = $label == $selectedLabel ? ' selected' : ''; echo "<option$selected value='$value'>$label</option>"; } ?></select> </form> in the skyscraper.js file is this script: $(document).ready(function() { $('.sort-select').on('change', function() { window.location.href = $(this).val(); }); }); The sort select form at the PW site http://modules.processwire.com/modules/?sort=title <form id=sort-select action=./> <select name=sort onchange="window.location.href='?sort='+jQuery(this).val()"> <option value=-likes>Sort by: # Recommendations <option selected value=title>Sort by: Title (A-Z) <option value=-title>Sort by: Title (Z-A) <option value=-created>Sort by: Date Added (Newest-Oldest) <option value=created>Sort by: Date Added (Oldest-Newest) <option value=-modified>Sort by: Date Last Modified (Newest-Oldest) <option value=modified>Sort by: Date Last Modified (Oldest-Newest) <option value=-release_state>Sort by: Release State (Stable-Alpha) <option value=release_state>Sort by: Release State (Alpha-Stable) </select> </form>
  5. Suggestion on documentation for $pages->find() method Would it be helpful to include more information about 'Selector Engine Array Support' in the documentation for the $pages->find() method? It's nicely documented in the blog from April 1, 2016, which talks about new things for ProcessWire 3.0.13. New: selectors as associative arrays New: selectors as regular arrays Blog: https://processwire.com/blog/posts/processwire-3.0.13-selector-upgrades-and-new-form-builder-version/#building-a-selector-string-with-user-input-example $pages->find() method documentation: https://processwire.com/api/ref/pages/find/
×
×
  • Create New...