Jump to content

Marty Walker

Members
  • Posts

    635
  • Joined

  • Last visited

  • Days Won

    3

Everything posted by Marty Walker

  1. Never mind I got it: <?php if($page->related_pages != '')...
  2. Hi, I've setup a related pages type field using ASMselect. It all works fine, the problem as per usual is my code (which mostly works): <?php if($page->related_pages) { echo "<h2>Related pages:</h2><ul>"; foreach($page->related_pages as $related_page) { echo "<li>{$related_page->title}</li>"; } echo "</ul>"; } The only issue I have is that if I don't select any related pages my H2 still appears. Regards Martin
  3. I have noticed one other little thing that shows up in my error_log file: [16-Sep-2011 12:14:53] PHP Warning: Missing boundary in multipart/form-data POST data in Unknown on line 0
  4. Yes I noticed that too. It's only when using the upload button.
  5. Sadly yes, I just checked both of them before I posted. I can post a video later if you like.
  6. I haven't read through all 6 pages. In Chrome & FF (OSX) the upload works fine. The only issue I can see is when I save the page the image get's uploaded again and I have a duplicate.
  7. Thanks Ryan. I've tried to strip your example back to something I could understand and tried to use urlSegment2 as a trigger to retrieve notes from a particular category: .com/notes/categories/links for example (similar to your journal on ryancramer.com). Can I use that url variable this way? <?php if($input->urlSegment1 == 'categories') { if($input->urlSegment2) { $urlcat = $sanitizer->pageName($input->urlSegment2); $notes = $pages->get("/notes/")->find("template=notes, sort=-publish_date, note_category=$urlcat"); foreach($notes as $note) { echo "<p>{$note->title}</p>"; } } } Regards Marty
  8. Hi everyone, I'm a bit stumped with getting categories to work for me in PW. Say my page setup is like this: Home - Portfolio -- work item -- work item -- work item etc - Blog -- Blog item -- Blog item -- Blog item etc - Categories -- Work --- cat_name --- cat_name --- cat_name etc -- Blog --- cat_name --- cat_name --- cat_name etc In my work and blog pages I have a field called categories with each parent being the Work and Blog subpages in Categories. I can add a category (via pageselect) to a work or blog entry no problems. What I can't work out is how to get a list of categories and filter work or blog items on those categories. Can I have: .com/work/categories/design - do I need to then move my Categories/Work tree beneath my Portfolio tree? or does it need to be: .com/categories/work/design/ Confusedly yours, Marty
  9. There's nothing in that 'page' template at all. I'll try and reinstall it. If I have no luck I'll email you. Thanks.
  10. I'm running 2.1 and if I don't have a page.php template file the error is: 2011-09-06 09:26:43: guest:/http404/:ProcessWire Error:Exception: Template file does not exist: '/home/site/public_html/site/templates/page.php' (in /home/site/public_html/wire/core/TemplateFile.php line 55) If I add that template file in the error is: 2011-09-06 09:29:05: guest:/http404/:ProcessWire Error:Exception: Unknown column 'counter' in 'field list' (in /home/site/public_html/wire/core/Database.php line 72)
  11. Thanks very much.
  12. Hi, This is a great timesaver but I'm not sure if I'm using this correctly as I get this: Unable to complete this request due to an error My redirect is: /contact/cv/ to /contact/ (using the page selector) I'm using the code off github and I'm sure that the url I'm redirecting from doesn't exist. Regards Martin
  13. Hi, I decided one way to learn a new system was to redo my site - which I've been wanting to do for a long time now. http://smd.net.au PW is such as fantastic system. Cheers to you Ryan. Regards Martin
  14. Thanks Ryan. Would I use it like this? Still learning this php lingo <? $today = time(); echo "<dl class='notes-list'>"; $notes = $pages->get("/notes/")->find("template=notes, sort=-publish_date"); foreach($notes as $note("date < $today")) { echo "<dt>{$note->title}<time pubdate>{$note->publish_date}</time></dt>"; echo "<dd>{$note->summary}<a class='read-more' href='{$note->url}'>→ read</a></dd>"; } echo "</dl>";
  15. Is there a way to approach this by using a custom date field and sorting by that field? And if that's possible can I also add pages with a date in the future that won't appear in the foreach results until that day. I know I could approach this part of the site by using WP or textpattern but it's not an intensive part of the site to warrant that. Regards Martin
  16. Just one more question regarding dates. I'm moving a site's content over manually (copy/paste as there's not much of it). Is it possible change the creation date? Regards Martin
  17. Thanks Ryan.
  18. Hi, How do I output the publish date of a page? I've tried: <? echo $page->date; with no luck. Regards Martin
  19. Thanks Ryan, I downloaded the most recent build and I'm still getting this behaviour. If I view the html in the editor I see: <img src="undefined" width="209" height="234" /> I'm running Safari 5.0.5 / OS X 10.6.7 Regards Martin
  20. Hi, I'm having an issue inserting images from other pages. I'm inserting into a wysiwyg field from another page that has an image field populated. I can navigate and see the image but when I insert it it disappears. Not sure if this an expected behaviour or a bug. Regards Martin
  21. @apeisa Thank you @sinnut Thanks for pointing those out. Fixed. I need to put in some work on the meta description area.
  22. Hi, There's not much to this one. It doesn't stretch the limits of PW at all but the client is very happy with how easy it is to edit content. http://walkerabercrombie.com.au/ This is my first PW site (I usually use either textpattern & ExpressionEngine) and it was an absolute joy to learn something new. Illustrations by the great: http://lewkeilar.com/ Regards Martin
  23. Hi, I have a reasonably urgent need for something similar to jCrop in ProcessWire. If anyone is capable of working on this (as a paid gig) please get in touch: martin@smd.net.au Regards Martin
  24. Scratch that. I know what I did. I'm a silly man.
  25. Hi, i successfully installed the lastest release from github. My first stop was to login to the admin and I get: Unable to complete this request due to an error I can add a template file into the template directory and it renders it fine with some basic php: <link href="<?echo $config->urls->templates?>reset.css" media="screen" rel="stylesheet" type="text/css" /> I'm stumped because I've installed PW fine in a subdomain elsewhere previously. Any help greatly appreciated. Regards Martin
×
×
  • Create New...