-
Posts
2,769 -
Joined
-
Last visited
-
Days Won
31
Everything posted by Martijn Geerts
-
Exclude pages from find if there's no template file.
Martijn Geerts replied to Martijn Geerts's topic in Wishlist & Roadmap
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. -
Exclude pages from find if there's no template file.
Martijn Geerts replied to Martijn Geerts's topic in Wishlist & Roadmap
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 -
Exclude pages from find if there's no template file.
Martijn Geerts replied to Martijn Geerts's topic in Wishlist & Roadmap
You have a valid point, but still it's kinda weird that an invisible page will be found with a default search. -
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.)
-
Did you build it with WordPress ? Great Lookin, love the colors schemes. Very good UI.
-
<qoute>but not Undeline</qoute>, I would consider that a good thing
-
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.
- 191 replies
-
- bitnami
- installation
-
(and 2 more)
Tagged with:
-
Switching fields to Language fields produces fatal errors
Martijn Geerts replied to arjen's topic in Multi-Language Support
@arjen, Those errors are on your home machine? If so, could it be a file permission issue after your reinstall of the OS ? -
-
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 !
-
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'
-
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.
-
@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
-
@daslicht, Search your answer in here. This came up today. Actualy I still think "Your reading should start here."
-
Shop-for-ProcessWire (@Apeisa)
Martijn Geerts replied to Nico Knoll's topic in Module/Plugin Development
<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 ) -
Capturing which user publishes a page
Martijn Geerts replied to leftblank's topic in General Support
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... -
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.
-
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
-
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();
-
Your reading should start here.
-
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.