Jump to content

Barry

Members
  • Posts

    72
  • Joined

  • Last visited

Everything posted by Barry

  1. embarrassed to admit that after some thorough digging, I found if($page->template = 'pageGeo'){ instead of with == which was messing up everything.
  2. I've tested this and $page->name and title and url all work fine. My homepage template doesn't have any other custom fields besides the already mentioned footer_nav
  3. Tried renaming the field. Tried creating a whole new field.
  4. $footer_items = $pages->get("/")->nav_footer; foreach($footer_items as $footer_item){ echo "<li><a class='menu-item' href='$footer_item->url'>$footer_item->title</a></li> "; } I have this code in my footer which is an included php file. On my homepage template I have a page field with multiple pages selected which I use to create a row of links. This works on every single page/template except on the homepage itself where I get a Warning: Invalid argument supplied for foreach(). I've also tried using $footer_items = $page->nav_footer; That also gives me an error. What am I missing?
  5. I've installed WireMailSmtp on my locally hosted ProcessWire site v 3.0.62 and filled in my sendgrid data and get a WireMailSmtpConfig: SUCCESS! upon testing When I try the following: if($mail->className != 'WireMailSmtp') { echo "<p>Couldn't get the right WireMail-Module (WireMailSmtp). found: {$mail->className}</p>"; } I get "Couldn't get the right WireMail-Module (WireMailSmtp). found: WireMail" How do I get the wiremail function to make use of the WireMailSMTP addon?
  6. I have a template which makes use of the page reference field and am able to reference fields as so... $places = $wire->pages->find('template=pageGeo'); foreach($places as $place){ //geo_type is a page field getting pages I have stored in the admin folder //checking if the name of the page reference in this way works if($place->geo_type->name == 'geo-province') { echo 'this is a province'; } } I have another template that also makes use of the page reference field but this won't return anything except the page id //this doesn't return anything echo $page->party_type->title; seems the only way to get it to return the title is as follows: $id = $page->party_type; echo $pages->get('id='.$id)->title; //this returns "birthday" party_type also refers to pages that are found within the admin folder Both fields refer to pages I keep in the admin folder. So what am I missing?
  7. dammit. Wel spotted Soma. Thanks!
  8. Okay, so I got this working by turning on URL segments and retrieving the segment[n] in the called file, still haven't figured out why it doesn't work with GET variables.
  9. Does it still work for you when you include the given source page as separate php file using WireIncludeFile()? My exact situation is as follows: page using basic-page.php template which uses WireIncludeFile() to include partialAgenda.php where the ajax call is which calls a page using ajaxAgenda.php template
  10. I tried the following: I put the file I call through ajax in the root (so I'm simply calling a php file rather than a page with a template) and am able to read out the get variable that way. But I'd rather not do it this way and would like to maintain calling a page with a get ?variable. Is there some kind of setting I'm missing?
  11. I should also note I've tried the following and removed data attribute without success url : "/components/ajaxAgenda/?pnum=1"
  12. I'm in the process of rebuilding a WordPress site over into ProcessWire (Yay!) I'm using Ajax to call a page (ajaxAgenda) from the homepage which includes a PHP file (partialAgenda) which makes the call. This is what I got in the included partial. Notice that the URL has a / at the end to prevent redirection. var page_number = 1; var get_agenda = function(){ $.ajax({ type : "GET", data : {pnum: page_number}, dataType : "html", url : "/components/ajaxAgenda/", beforeSend : function(){ $('#ajax-loader2').show(); }, success : function(data){ $('#ajax-loader2').hide(); $('#agenda').html(data); } }); } And in the Ajax called file I have the following echo $page->url.'<br>'; echo $input->get->pnum.'<br>'; echo $_GET['pnum'].'<br>'; which only outputs "/components/ajaxagenda/". pnum is empty and get is also also empty It seems like the variables are simply being stripped from my Ajax call. Or am I missing something really obvious?
  13. Any chance this module can be updated to support textarea language fields?
  14. I did, but there are multiple parent pages with multiple child pages. The select is in the child and I'd like to dynamically populate the select with data from a repeater from the parent. so: _ parent1 (with repeater) _ _ child1 (get from parent 1) _ _ child2 (get from parent 1) _ parent2 (with repeater) _ _ child1 (get from parent 2) _ _ child2 (get from parent 2) _ _ child3 (get from parent 2) I tried editing the module by adding an option to the choosepagesfield with $page->parent but I just ended up breaking it
  15. This works great for what I'm working on! Is there a way to limit populating the select from a field within a repeater from just the parent page?
  16. that is simply awesome I had no idea about this page or that this was already built in. How did I not know about this (doh) and the pro module makes it even better! much appreciated!
  17. I'm trying to figure out a way how I can allow a client query and generate lists via the admin and not via de frontend where I would have to build templates and use the API to query and generate data. For a bit of back story: the client will be able to create study courses via de admin. Visitors will be able to sign up for a course via de frontend and the details will be written to the database via de API. Visitors who have signed up will have a status: pending approval, pending payment, approved or declined. The client will be able to edit the status via de admin. I'd like for him to be able to query the data via de admin and generate lists (search results), sort of in the way you might build frontend templates that are only accessible for the signed in admin users but then within the admin itself. I've searched modules and the forum but haven't found anything concrete. Any ideas would be appreciated!
  18. Upgrading MySQL to 5.1.70 has resolved this issue
  19. I haven't upgraded yet, but have learnt something new. Changing the order of pages does nothing in Chrome or Firefox as described above. Changing the order in Chrome DOES change the order of the pages on the site in Safari. Even after refreshing the admin in Chrome to cause the original order to return, the order remains unchanged in Safari. It only changes again after changing the order of another page in Chrome in the admin. This causes the last moved page to be in the new position and all previously moved pages to be back where they were as it is in Chrome.
  20. I have the opportunity to update to 5.1.70. Anyone have any feedback or objections before I go ahead with the update?
  21. I don't know why I didn't think to test this earlier, I have another site on the same server running on ProcessWire and I just checked to see that site has the issue, and it does. This site was developed on a completely different test server with a different version of MySQL (5.1.61) and the drag and drop works fine there. Is it safe to assume this is due to the database version and not some other requirement? When installing Processwire, all the requirements were met.
  22. I'm hoping that this isn't a MySQL version issue, I'm not sure I have the ability to change this through my client's hosting provider. The blog profile is the only module I have installed which I'm testing in Chrome v28 on OS X 10.8.3. I'm also running the latest version of ProcessWire. After dragging the page, it lands in it's new spot as it should, but the site doesn't update and upon refreshing the admin, the page is right back where it was. The pages were named page 2 and page3 (with and without spaces) but I've renamed these to things like about us and contact, etc but the same issue persists.
  23. So what the most ideal version of MySQL to have running for ProcessWire 2.3.0?
  24. According to phpMyAdmin, I'm running version 5.1.51a, is that a version that might be causing issues?
×
×
  • Create New...