-
Posts
2,776 -
Joined
-
Last visited
-
Days Won
40
Everything posted by Macrura
-
@root, 1) have you checked the javascript console? any errors there? 2) Have you considered using pagetable instead of repeaters, for your bootstrap accordion
-
@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.
-
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");
-
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)
-
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
-
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
-
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)
-
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);
-
@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.
-
@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...
-
@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/
-
not sure if this is resolved; you would just update PW using the admin, update module.
-
@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
-
How to display newly added field value in page.
Macrura replied to Citytech Tester's topic in Getting Started
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. -
@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
-
Remove link from specific top-level page with child pages
Macrura replied to Neo's topic in General Support
yes, definitely because someone might backhack to that page -
Remove link from specific top-level page with child pages
Macrura replied to Neo's topic in General Support
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>', -
Remove link from specific top-level page with child pages
Macrura replied to Neo's topic in General Support
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... -
Remove link from specific top-level page with child pages
Macrura replied to Neo's topic in General Support
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 -
building a news system could take some in depth knowledge of the api - i would read all of the docs and study the cheatsheet. the navigation is trivial; there are innumerable ways to include/exclude pages (MSN supports selectors)
-
Remove link from specific top-level page with child pages
Macrura replied to Neo's topic in General Support
it depends on how Page C menu item is supposed to behave - is it just a list element, a hash, or a javascript:void(0) ? -
I'm using this technique, but noticed a couple of small issues: 1.) The email is sent in a format that forces the lines to break at a fixed character count (definitely on outlook for example) and this makes it so you can't click the URL in the message; and i can see it being probably hard to copy that if you were on a mobile or other touch screen. Not sure if there is really any way to fix this except to maybe send the message as HTML. 2.) Th confirmation screen once you have reset the password is not working, in other words i'm not getting to step 4 for some reason it redirects to the the same page and shows the form again, however the password reset is working. Otherwise this method seems to work really well. *note, I set this up as an issue on github
-
AFAIK this is not true; you can just create a field and use type Selector from the dropdown; there shouldn't be any extra steps needed. @Ivan Gretsky - maybe you didn't install the module?