Jump to content

Macrura

PW-Moderators
  • Posts

    2,780
  • Joined

  • Last visited

  • Days Won

    41

Everything posted by Macrura

  1. have you tried testing the www url with a gzip testing service?
  2. you can hook into the URL render for the child pages by template, and change their URL - something like this (untested): wire()->addHookBefore('Page::path', function($event) { $page = $event->object; if($page->template == 'pricelistitem') { $event->replace = true; $event->return = $page->parent->url; } });
  3. i think you may have just hit upon a situation where you are using multi-language and repeaters, and it's just one of those rare cases where things don't cooperate. I don't use multi-language at all, and i don't have time/resources to test, but you should keep an eye on the js/network consoles when you click save and report any errors. I don't think repeaters were ever designed/tested extensively with extreme scenarios of multi-lingual fields, and ck editor, and multiple instances of a repeater; Many developers have migrated repeater usage to pagetables at this point, except in some simple use cases where it is more convenient to see the fields inline; if your use case allows it, see if you can migrate to pagetable and if this is a stable solution. if you believe you have discovered a real bug, you can submit an issue Github; I would plan on waiting 4-6 weeks or more for your bug report to be addressed, which is why if you can discover a work around, that would be best.
  4. So i think you already tested this by using a clean install, but just in case want to point out to replace the entire wire directory when upgrading, and also to be safe, replace your index.php, and your .htaccess file (but with .htaccess, make sure to compare in case you have some specific rules for your site there). I think your problem may be related possibly to the multiple repeaters, and possibly specific to the fields you are using in those repeaters. it's definitely more reliable to go with the pagetables instead of the repeaters, especially if this solves the issue. Did your 2nd repeater use a ckeditor?
  5. @root, 1) have you checked the javascript console? any errors there? 2) Have you considered using pagetable instead of repeaters, for your bootstrap accordion
  6. @kathep, you''ll notice that the has_parent selector limits the find to a certain parent, but recursively includes all children which is why the has_parent selector is being suggested: has_parent=$page http://cheatsheet.processwire.com/selectors/built-in-page-selector-properties/has_parent-page/ my experience with processwire has taught me that anytime you are having trouble getting a particular results set of pages, you either have some mis-configuration of your page hierarchy, or you haven't found the exact selector; PW selectors are very powerful, especially with all of the enhancements of the last year or so; In cases where page arrays and selectors don't work, then you can move on to sql commands.
  7. i believe that my post above would do what you want.
  8. to put it simply, you only want descendants of the current page, $allChildren = new PageArray(); foreach($page->children() as $parent) { foreach($parent->children() as $child) $allChildren->add($child); } $assignments_find = $allChildren->find("template=quiz|challenge|assignment, course_name_from_list=$page, sort=assignment_due_date");
  9. I see some things that i would change, for one, i don't get this: course_name_from_list.title=$page->title is course_name_from_list a page select? if so you should be able to do course_name_from_list=$page i would also research these selectors: has_parent (=$page for example) $page->children($selector)
  10. if you want to make icons searchable (when setting them on a template), you can use chosen select.. 1) add chosen min.css, min.js and sprites in AdminCustomFiles folder. 2) enable ProcessTemplate in the ACF module settings 3) add lines to load chosen assets (in the dependencies box) ProcessTemplate AdminCustomFiles/chosen.min.css ProcessTemplate AdminCustomFiles/chosen.jquery.min.js 4) create processTemplate.js, inside AdminCustomFiles folder $(document).ready(function(){ $("select#Inputfield_pageLabelIcon").chosen({ disable_search_threshold: 10, no_results_text: "Oops, nothing found!", width: "25%" }); }); this will probably end up being a module, so that it can also extend to fields; for now if you want to do it on fields you have to repeat the instructions for ProcessField and also change the jquery selector
  11. cool - thanks for the improvements, will come in handy - sorry about the error, i took a guess on the first line, b/c i had it hardcoded.. will update my post
  12. you could write a simple script using strpos on the body and then add tags conditionally; you could do it all in 1 go with a script such as that (have done a lot of stuff like that when setting up new sites and importing)
  13. i'm doing this which works: $base_url = 'http://' . wire('config')->httpHost . '/'; $placeholders = array('class="align_left"', 'site/assets/files/'); $replacements = array('style="float:left;margin-right:10px;"', $base_url . 'site/assets/files/'); $body = str_replace($placeholders, $replacements, $message->body);
  14. @kathep - for that # of listings, datatables might be the easiest, quickest way to do this; at least that's how i would do it, since i don't know how to use listerpro in the frontend (not saying it can't work, but have never considered it)... DataTables just kind of works out of the box and you would only need to output your table from PW and initialize dt; however i would say that you'll have to know a little javascript to get it to all work; you may need to also use a plugin for the select filters, in case you don't want to generate your own. if you init a html table, then it will start with all table data paginated; but if you wanted to have no records show until a filter is selected, then you could load the data from ajax and then use deferLoading; this would start you out with an empty table and load on callback after the filter change.
  15. @adrianmak - if you use the GET variables (aka query string parameters), then you can use them in a selector, once sanitized; and then use that selector to present the relevant posts. I have used that option, but now i always use segments, since i can cache those pages. i would probably only use get vars if i was maybe filtering client side, so still able to cache the page itself...
  16. @kathep, frontend search with filters (AFAIK) is going to be quite different than from within PW. One thing you might consider is to use a combination of jQuery DataTables with some custom select fields, perhaps a bit of Chosen Select; here's an example: http://katonahartcenter.com/pages/schedule/
  17. not sure if this is resolved; you would just update PW using the admin, update module.
  18. @Engine44 you'll need to follow the instructions for making a database, and a database user, from within PHPMyAdmin. When you start MAMP look in the right column for the tutorial on how to do that. https://www.drupal.org/node/66187 You might also consider taking the easier route of developing with the Bitnami Stack. https://bitnami.com/stack/processwire
  19. Hi and welcome to the forum! if you are using _main.php, that sounds like you are outputting $content; so you have to add your output to that var. if you are a beginner and using the beginner profile, then you would only need to echo your field. Sounds like your field is multi image, so you'll need to foreach that and output your markup in the loop, for each image.
  20. @heldercervantes - i'm using Ryan's example profile editor for logged in users to change their password; that works great, it's based on Formbuilder, and uses hooks to process the profile change. https://processwire.com/talk/topic/9574-edit-user-profile-frontend/?p=92143 If you are looking for forgot password, this might help: https://processwire.com/talk/topic/1319-forgot-password-on-front-end/?p=96363
  21. you can exclude by template, or parent, or any other valid selector. e.g. parent!=/path/to/page/
  22. yes, definitely because someone might backhack to that page
  23. just tested my method and works perfectly. you sure you did it right? glad i know this works now, gonna come in handy! 1.) Create new field, call it url_override 2.) Add to your template 3.) on the Page C page, type a # into the field 4.) in your treemenu options make sure you have this: 'item_tpl' => '<a href="{url_override|url}">{title}</a>',
  24. i'm not sure if this would work, but you could try adding a url override field to the template and then do this: 'item_tpl' => '<a href="{urloverride|url}">{title}</a>', haven't tested, but if this doesn't work, it surely would be a good thing for MSN to support...
  25. not really, your markup shows a full link to page c: <a href="/processwire/page-c/">Page C</a> So you need a hash there instead of the url? will you menu work if the anchor tag is removed entirely? you should test the hardcode first maybe
×
×
  • Create New...