Jump to content

diogo

Moderators
  • Posts

    4,296
  • Joined

  • Last visited

  • Days Won

    79

Everything posted by diogo

  1. Not possible, you can only have field names on the left of the operand. Alternatively you could either find all the pages where price is not empty, and then remove the ones where retail price is the same inside a foreach: // not tested $result = $pages->find('Price!='); foreach ($result as $r) { $result->remove($result->get("RetailPrice=$r->Price")); } or create a new field that holds the diference of those two fields by hooking on page save to populate it.
  2. You might also want to have a look at some ready solutions for selling digital goods. Smashing Mag has a good article about it http://www.smashingmagazine.com/2012/03/29/selling-digital-goods-online-e-commerce-services-compared/
  3. Of course! Just have a look at how the admin works: .../processwire/page/edit/?id=1031 In that particular case, the query is handled by the ProcessPageEdit module with the following line: else if(isset($_GET['id'])) $this->id = (int) $_GET['id'];
  4. Sorry, didn't read the title...
  5. diogo

    Social Website.

    @totoff, did you actually post a second time 30 minutes later, or is this a forum problem?
  6. $page->repeaterfield->imagefield Make sure you are calling the field correctly. If it's a single image field (limit is 1): $page->repeaterfield->imagefield->url and if it's a multiple image field (limit is 0 or more than 1): foreach($page->repeaterfield->imagefield as $img) { echo $img->url; }
  7. Hello Tramvai, welcome to the forum! Make this your 'cars' template: <?php $session->redirect($page->child->url) edit: Adrian was too fast
  8. Just had a quick thinking about this and the first impression that I have is that it would be enough to have the same approach as Soma's image manager (1 page -> one folder) but add the ability to change the url to that folder in the .htaccess (probably this would have to be done manualy after knowing the ID of the page) and extend the files module so ->url uses the new url instead.
  9. Yet another way would be to use url segments and page fields instead of having the page as children of each film. Just like tags and categories. https://processwire.com/talk/topic/3579-tutorial-approaches-to-categorising-site-content/
  10. Yes, if the pages are created with the API, but I interpreted that the pages would be created via the admin. I can be wrong, of course.
  11. @3fingers, I don't think that's whats being asked. @pleini, you can define rules for naming the children of a page in the family tab template of this parent page. To be able to do that you just have to define a single allowed template for the children http://processwire.com/api/modules/process-template/
  12. Lot's of things to try there NooseLadder The last album of Devendra Banhart is what we're listening to the most last days http://grooveshark.com/#!/album/Mala/8629162
  13. You can also have a textarea field on the pages where you are holding the names. If there's some text there it would be used instead of the default.
  14. I would do the segments to keep it DRY. In my opinion there are less management issues, since the data is in only one place. I don't see any problem for SEO if you go this way, just create the site map accounting with those pages and for the crawlers the pages will be as real as with the other method. I also can't think of a performance issue created by this, would probably be worse with Hanna code.
  15. Yes, you can upload the same image as many times as you want Srly now, you can't use an already uploaded image from a field because images have a 1/1 relation with pages. This makes the system behave in a simpler and safer way, and there is not the risk of making images that are being used by a page from disappearing when their original page is deleted for some reason. If you need the same image in two different pages, the best bet is to re-upload it, and have two copies in the system. You can always reuse images from the templates by calling the page where they are in. This was discussed already some times but I don't have the time to search right now. You might want to search a bit in the forum to find some interesting discussions on this subject.
  16. Yep, good one Wanze. But for what I understood there are more than one page for each id. In that case append should still be import, and get should be find.
  17. You can simplify it like this $result = new PageArray(); foreach($v_array AS $v) { $result->import(wire('pages')->find("template=xx, film_id=$v")); }
  18. Hm, tricky question... maybe like this? $result = wire('pages')->find("template=xx, field_x=439"); $result = $result->import(wire('pages')->find("template=xx, field_x=417")); $result = $result->import(wire('pages')->find("template=xx, field_x=456")); $result = $result->import(wire('pages')->find("template=xx, field_x=402"));
  19. sort() accepts a selector https://processwire.com/api/selectors/ and that is not one. Try $dmcs->sort("parent.title"), although i'm not sure it will work.
  20. I followed these http://coolestguidesontheplanet.com/get-apache-mysql-php-phpmyadmin-working-osx-10-9-mavericks/ and these instructions http://coolestguidesontheplanet.com/set-virtual-hosts-apache-mac-osx-10-9-mavericks-osx-10-8-mountain-lion/ everything is working great. There's also ammps that I tend to prefer over mamp http://www.ampps.com/
  21. There's no possible backup plan against idiocy...
  22. Also, you are looking for the events that will happen in this precise millisecond try using Datum=today instead of Datum=$t
  23. There is also https://code.google.com/p/pubsubhubbub/. I still didn't take the time to go through their docs because I didn't have a need for this, but have it bookmarked on delicious for some time already.
  24. $pages->get("parent=/contract/, name=$contract") You might consider changing the name of the parent to contracts
×
×
  • Create New...