-
Posts
4,632 -
Joined
-
Last visited
-
Days Won
55
Everything posted by apeisa
-
Retrieve The Type of A Field From Inside A Module
apeisa replied to bytesource's topic in Module/Plugin Development
Not following whole discussion, but just mentioning that you can combine multiple textformatters for single field. Like textile + paragraph stripper. -
// Bookstore examples // Find all books that are priced over 30 dollars and set them on sale $overpricedBooks = $pages->find("template=book, price>30"); foreach($overpricedBooks as $b) { $b->title .= " *SALE*"; $b->price = $b->price - 10; $b->save(); } // Find author $sk = $pages->find("template=author, title=Stephen King"); // Find all books written by that author $books = $pages->find("template=book, author=$sk"); // create new author $ap = new Page(); $ap->parent = $pages->get("/authors/"); $ap->template = "author"; $ap->title = "Antti Peisa"; $ap->save(); // Add Antti as a second author for all the books written by Stephen King (continues from earlier example) foreach($books as $b) { $b->author->add($ap); $b->save(); }
- 30 replies
-
- 6
-
-
- Drupal
- get started
-
(and 1 more)
Tagged with:
-
Template dropdown options not working on add new page
apeisa replied to dazzyweb's topic in General Support
Sorry I'm on mobile typing. -
Template dropdown options not working on add new page
apeisa replied to dazzyweb's topic in General Support
Not sure I remember correctly, but template changing might be possible just for superuser to make development faster. Not all agrees with this is good practice and there is an GitHub issue filed already. If I remember correctly you -
Very big part of our business at Avoine is build on top of ProcessWire. We are something between 2.5 to 3 million euros revenue currently and working with ProcessWire since 2010. Solutions we build on top of this platform are things like websites, applications like event management, voting systems and member portals. Our clients include some of the biggest non profit organizations in Finland. Our focus and pw usage only grows from day to day. Happy to tell you (or your client) more if needed.
- 12 replies
-
- 10
-
-
I would love to buy one of those beards WillyC is wearing!
-
New PW Project - notification and approving page changes?
apeisa replied to FuturShoc's topic in General Support
One option to evaluate is Teppo's version history module, and it's snapshot feature in particular. Maybe having latest approved date -field and then use that together with snapshot? I am sure that no matter route you will take, it won't be simple. But that would be interesting to investigate. -
Pw book has been discussed many times before and would definitely be worth it. But little math error in your calculation. If 100 people buys 30 euros book, it will give 3000 euros, not 30 000.
- 4 replies
-
- 1
-
-
- BOOK
- PROCESSWIRE BOOK
-
(and 1 more)
Tagged with:
-
Edit the product template you created and add sc_price field to it. This means: login to admin, goto setup => templates => product and add the sc_price field and save.
- 30 replies
-
- 2
-
-
- Drupal
- get started
-
(and 1 more)
Tagged with:
-
Pages Web Service query doesn't find result
apeisa replied to verdeandrea's topic in General Support
Also have you configured the module to return the actual template / fields? -
Agreed. Also nice to see more Finnish agencies joining ProcessWire!
-
Thanks Ryan. You give me way too much credit. Happy that I could contribute to selector inputfield. And always grateful that company I work at has great trust and support for processwire. Lister is really a game changer for ProcessWire, thanks for building it Ryan!
- 68 replies
-
- 13
-
-
Actually... old car, no babies coming... but logo is new!
-
Use custom selector in your page field: template=user, include=all
-
//$related = count($page->related) . renderNav($page->related); // instead of the above, try this: // I assume from your old code, that this will keep the markup for related articles $related = ''; // Check if there is more than 0 related pages if ($page->related->count() > 0) { $related .= "<h2>Check out these related articles</h2>"; // Render headline $related .= "<ul>"; foreach($page->related as $p) { // Loop through all related pages and then generate their markup $related .= "<li><a href='$p->url'>$p->title</a></li>"; } $related .= "</ul>"; } In your old code you are actually outputting the count and then something. What we don't know is your renderNav function (what it does), since it's not visible for us.
- 1 reply
-
- 1
-
-
You know the effect: you buy new car, you start seeing similar cars everywhere. Your wife is pregnant - you see pregnant women everywhere. You have new logo with P in the circle - you see logos with P in the circle everywhere...
-
Like the rest of us. Although soma's photo is from day after...
-
60 fields is peanuts.
-
Same here. I think one fundamental difference is that admin template (and therefore process modules) doesn't have fields. Admin pages created by this module can have fields (if I have understood correctly how this module works).
-
Processwire or ExpressionEngine? Looking for a change from MODx: http://www.reddit.com/r/webdev/comments/201s3l/processwire_or_expressionengine_looking_for_a/?utm_source=dlvr.it&utm_medium=twitter
-
Cutting edge php required? Parse Error: syntax error, unexpected '[' (line 830 of /site/modules/ProcessPageTreeMigrator-master/ProcessPageTreeMigrator.module)
-
Yes, that is a good example. Did you got it working?
-
Also do you have output formatting set to false at some point? It makes single image fields behave as arrays too. if you add the eq(0) to imagevedette field too, the url method will work. There are no restrictions for the amount of image fields in template.
-
It looks great on desktop. But unfortunately it is very hard to use on my mobile (which I think is very important for this kind of site).