Jump to content


  • Posts

  • Joined

  • Last visited

Everything posted by carlos

  1. Thankyou for building out this form. I was trying to setup the plugin, but everytime I remove a field name I get the following error: Error: Call to a member function save() on null (line 1098 of /home/marmil113/marshhospital.com/site/modules/simplecontactform/SimpleContactForm.module) Any idea what I can do?
  2. That did the trick like nobody's business. Thanks guys!
  3. Thanks guys, I haven't gotten to test this out yet. But I'm sure that's the root cause. I'll post back when I try that out.
  4. Hello ya'll. So ran into an interesting problem. The current project i'm working on is for a photographer. They would like to upload large image files. Scratch that it's more like huge! So it's not so much the image size I'm running into an issue with, but actually the image dimensions. 1900x2860 px image doesn't upload, mind you the file size is about 800k. the uploader just gets stuck. Reducing the image dimension to 1800px, allwed it to get uploaded finally, but when rendering the image on the site I would get the following error: Error Allowed memory size of 33554432 bytes exhausted (tried to allocate 2800 bytes) (line 144 of /Users/carlos/Sites/test/wire/core/ImageSizer.php) Obviously getting around this was simple and reducing the image width to a more managable size of 1200px did the trick. I'm not sure if this is a bug or I just hit some sort of limit. But figured I'd throw this out there to see if there is some sort of fix. Thanks!
  5. I think this forum must read minds. I just had some users ask for this exact feature. Thanks Nico, extremely useful.
  6. Thank you sir!!! That worked a charm!!! I'm amazed at the simplicity of it.
  7. Hello All, so after finding most of my information from scouring the forums. I was able to build a page that sorts it's children based on their category. This works out great. For this particular use case, I also need to page through each individual child, by use a next and prev button. The catch to this, is that I also want the url to updated. the url should read: http://site.dev/ad-p...ategory/product But instead it reads: http://site.dev/ad-p.../category/page2 when I add pagination to the mix. So I'm pretty stuck now and I'm not sure how to proceed. Also the way I went about using categories, if there is a simpler solution or best practice, please let me know. I would like to improve as much as I can. Thanks and here is the code I'm using below: <nav> <ul> <?php $name = $sanitizer->pageName($input->urlSegment1); $prodName = $sanitizer->pageName($input->urlSegment2); $bodyContent = $pages->get("/ad-products/$prodName"); // get all categories $categories = $pages->get("/categories/")->children; $products = $pages->get("/ad-products/"); // loop categories foreach($categories as $cat) { //class is on if on the page($cat) or the child(what's the parent) $class = $name == $cat->name ? " class='on'" : ''; echo "<li $class><a href='{$products->url}{$cat->name}/'>{$cat->title}</a></li>"; } ?> </ul> </nav> <div id="content"> <?php // output pagination links $prod = $page->children("limit=2, sort=-date"); $pagination = $prod->renderPager(); echo $pagination; echo "<p>$bodyContent->body</p>" //3rd Nav echo "<nav id='sec-nav'>". "<ul>". "<li><em>Skip To:</em></li>"; foreach($categories as $cat) { $prodName = $sanitizer->pageName($input->urlSegment2); // find all samples having the current category $products = $pages->get("/ad-products/")->find("categories=$cat"); if( $name == $cat->name ) { foreach($products as $child) { $class = $prodName == $child->name ? " class='on'" : ''; echo "<li $class><a href='{$child->name}'>{$child->title}</a></li>"; } } } echo "</ul>". "</nav>"; ?> </div><!-- /content -->
  8. That makes a lot of sense to clear up the description. It's a quick fix.
  9. Thanks a bunch Ryan! Problem solved. It was because Parent of Selectable Pages was set to Home. This was a good learning experience. Much appreciated with the help
  10. Hey Apeisa, that's exactly what is happening. It lets me select the page and save it. But, when I go back to double check the save, it is blank. I've tried other input field type selectors, but they don't provide child selection. Any Idea how to get around this or maybe a fix? BTW I'm running ProcessWire 2.1.0 Thanks!
  11. Ok after playing with it for a bit more, an issue cropped up. Seems if I choose a child page of a Section to redirect. It does not save it. But it does save the url if it is a section... :-\ BTW I'm using the PageListSelect As the Input Field type. SInce it lists children of sections for selection. Is this a problem with the Page field?
  12. That was perfect!! You really can do anything in PW. You just got to know how ;D
  13. Been using PW for a bit now and so far I've been able to find answers to most of my questions through the forum, but this time I'm drawing a blank. So I have a special use case for sub navigation on my site. I have global nav which is pretty standard. When you are on a section you have your standard sub-nav. The issue I'm having is, how do I create a sub nav link in a different Section that points to another page and redirects to it. I'm pretty stumped... Thanks for any help. Here is an example of what I mean: Section 1 - s1_child 1 - s1_child 2 Section 2 - s2_child 1 - s2_child 2 - s1_child 1 And this is the code I've been using so far: <?php // Output subnavigation if($page->path != '/' && $page->rootParent->numChildren > 0) { if($page->numChildren >0){ foreach($page->children as $child) { $class = $page === $child ? " class='on'" : ''; $str = $child->title; //limiting title on navigation if(strlen($str) > 15 ){ $title = substr($child->title, 0, 13)."…"; } else { $title = substr($child->title, 0, 15); } echo "<li $class><a href='{$child->url}'>{$title}</a></li>"; } } else { foreach($page->siblings as $child) { $class = $page === $child ? " class='on'" : ''; echo "<li $class><a href='{$child->url}'>{$child->title}</a></li>"; } } } ?>
  14. Well done! ;D This is exactly the field type that I need for an upcoming project.
  • Create New...