Jump to content

Martijn Geerts

PW-Moderators
  • Posts

    2,769
  • Joined

  • Last visited

  • Days Won

    31

Everything posted by Martijn Geerts

  1. For me it's quite confusing when a page is found, but accessing by URL throws a 404. The reason not showing the view button next to the page in the admin is for this reason I guess. Nevertheless, this is a feature request.
  2. I don't get what you say here: Maybe it's rendered via urlSegments etc If there's no file, there's nothing you can render. What I mean, in the admin: [ home ] | `-- no templateFile, Invisible [edit] // notice, no view button, so hidden. (assumed, correct) | `-- basic-page, Cars [edit][view] | `-- basic-page, Bikes [edit][view] | `-- basic-page, Houyse [edit][view] $all = $pages->find("parent=1"); $all, includes the invisible page. // For me it makes more sence, that the page with no template is excluded from find same as hidden and unpublished
  3. You have a valid point, but still it's kinda weird that an invisible page will be found with a default search.
  4. Would be great if pages without template file could be excluded from a search. // now I end up doing this, but obviously this doesn't work well for other situations foreach($items as $item) { if(!$item->template->filenameExists()) continue; // do stuff }
  5. Sorry to respond this late, I do think it sould be done client side instead of serverside, as server side is one step to late. I will marinate this for a while till I have some spare time.)
  6. Was thinking the same. Nice to see you pick this up. ( not much time here these days, still working ) I totally misread your post. ( Think better go to bed )
  7. Did you build it with WordPress ? Great Lookin, love the colors schemes. Very good UI.
  8. <qoute>but not Undeline</qoute>, I would consider that a good thing
  9. If a logo will be created, we have to think about the aspect ratio. Most logo's are scaled down depending on their width, portrait or 'square' logo's will do better in most cases.
  10. @arjen, Those errors are on your home machine? If so, could it be a file permission issue after your reinstall of the OS ?
  11. +1 for the name change. ( And afterShave is a good name for my modified one )
  12. <quote>Have you tried turning off session challenge?</quote> Then there's no problem. (I think, it doesn't happen that often at all so hard to test.) I still do think it's related to CodeKits automatic reload.
  13. I do see this message random lately. ( latest dev ) It happens, after already logged in and multiple tabs open. A thing what possibly trigger the error message is: CodeKit. Do more People experience this with a 'reload/inject' app ?
  14. Sorry Nik, didn't read your post very well. I agree on the sibling issue. --- ps, customised your wonderful Module, ( + added some permission related things in it only useful in this instance ) I called it afterShaveActions. Thanks for creating AfterSaveActions. Love your coding style !
  15. I'm using the url field often to store links from imported RSS items. It would be nice if the URL stored in the URL field could be easily visited with a click. Maybe popup in a magnific-popup. or a target='_blank'
  16. Feature request: ( Same as Kongondo ) For the select / radio options. Edit next / previous sibling, include all. (hidden, unpublished etc.) side note: Don't know if that is possible with $page->next, (does that include all ?) But could be done with $page->next($page->siblings("include=all")) for sure.
  17. @Soma, <qoute>Martjin, add() works for both actually.</qoute> Maybe I love the different terms (plurals vs nouns) in scripting that much that I never tried to use add() with Wirearray
  18. @daslicht, Search your answer in here. This came up today. Actualy I still think "Your reading should start here."
  19. <quote>Switzerland we're the only country in the world that has no 0.01 </quote> The netherlands they don't accept cents in shops. always rounded, not floored. ( Must be a multiple of 10 years we payed with cents, I can't remember it )
  20. sorry, didn't read well enough. $page->createdUser // The user that created this page. Returns a User or a NullUser. $page->modifiedUser // The user that last modified this page. Returns a User or a NullUser. The User class is extending Page, loads of things you can do with a page, you can do with a User. You can find these things in: http://cheatsheet.processwire.com/, actually the explanation is a copy/paste Changed this post...
  21. Or set the name with a Unix timestamp the user has ordered the product. It's not likely that the customer orders multiple products in a second so you don't need the date field.
  22. Sidenote: For storing data on Field 'Type of Page' (multiple): $user->pages_field->add($a_page_object); // single (Page) page $user->pages_field->import($page_array); // store (Wirearray) pages
  23. Look at the bottom of the page: http://processwire.com/api/variables/pages/ Most likely, you want to save more data, a way to save is below. If you're doing it the API way, be sure that all data that gets stored is sanitized. $parent = $pages->get('/about/'); $p = new Page(); // create new empty page object $p->template = 'a template'; // required $p->parent = $parent // required $p->title = 'My Page'; $p->save(); // save also creates a folder. That folder is needed if you use files/images in that template. // Only need this step if you want to add images|files $p->image = 'path/to/image.jpg'; // single image field $p->images->add('path/to/image1.jpg'); // multiple images field $p->save();
  24. Your reading should start here.
  25. I think this could be simpler. Add a field 'Type of Page' (multiple) to the user template. Then you can access and store it directly on the user.
×
×
  • Create New...