Jump to content

diogo

Moderators
  • Posts

    4,314
  • Joined

  • Last visited

  • Days Won

    80

Everything posted by diogo

  1. Well, this is new!
  2. Ok, you did more changes than only those two. I noticed that you changed from { to [[ and seems to me that you removed the ability to output all the images from the field. I also had trouble to output the images even after I changed the call to [[ and can't seem to figure out why. I guess I would need more time to test the module before merging and won't have much time during this week. Would you prefer to wait or release the module on your own? Any is fine for me
  3. The guys at uberspace.de sent me this email after my pw install: Translated from German (not by me obviously) --- Everything seems to be working fine here. Are they being too cautious or would it make sense to consider changing it in the core?
  4. Hi kixe, thanks for working on this and for asking. Would be much better to merge than to create a new module with similar goal. Can you please wait that I give a test first? I'm hoping I can do it a bit later today.
  5. Not really, browsers and clipboard are a muddy area. I encountered too many problems to implement something that would be secondary to most people. Not planning to go forward with this.
  6. Not much time here, but just to say that you can always link to a search page where you filter the results by get variables. for example: /places-search?place=london&cat=see&interests=history /places-search?place=london&subcat=monument&interest=ancient
  7. Craig is saying that he adds a field for each created page that contains the original id in the old database. If something goes wrong, or you need to adjust something in the import, or you need some more info from the old database that you didn't import originally, or you simply need to check if the items were imported correctly, you can check that field against the ID in the old database. $p->legacy_id = $row['id'];
  8. Not sure if I would. Depending on how the site would be built I would probably use your solution and create the views for those. Probably with a listing of all the interests and a sublist of all the places in each interest, but then, maybe it makes more sense interests inside places and not the opposite. It really depends on the content.
  9. I'm suggesting that he doesn't link to them Edit: Oops, before I forgot to change $i->url to simply $url on my suggested code. Maybe now it's more clear.
  10. Ya, probably simpler solution, but I wanted to avoid having to create views for /interests and /interests/interest that can be navigated by the url
  11. @elabx, not possible. We are in one of the interests pages at this point. -- You have only two ways of passing info to the future page when pressing a url: the url itself or session. With session there is no way to create a permanent shareable page, so i would go for the url. you can do this with url segments or using a get in the url referring to the place. -- I would simulate with url segments that interests is at the same level of the tree as (do, see, etc) and link to there instead, leaving the interests pages without a template file. You could do it like this: <?php foreach ($page->interests as $i) { $place = $page->closest("template=place"); //or whatever works $url = $place->url . "/interest_" . $i->name echo "<li><a href='{$url}'>{$i->title}</a></li>"; } ?> On the template from the places pages you would have something like (rough draft): if ($input->urlSegment1) { if (!substr($input->urlSegment1,0,9) == "interest_" ) throw new Wire404Exception(); $reduced = str_replace("interest_", "", $input->urlSegment); $sanitized = $sanitizer->name($reduced); $int = $pages->get("name=$sanitized"); $pois = $pages->find("template=poi, interests=$int"); $content .= renderNav($pois); } Edit: And welcome to PW! Edit2: corrected typo
  12. You have to be logged in to read the errors.
  13. You have to read the errors
  14. You are getting the general field itself, not the field in that page. Try this instead: $other_page = $pages->get("selector_for_the_page"); $other_page->setOutputFormatting(false); $other_page->bestelnummer = $other_page->bestelnummer++; $other_page->save('bestelnummer'); To understand the second line check this: http://cheatsheet.processwire.com/page/built-in-methods-reference/page-setoutputformatting-true-false/
  15. If you're already inserting the message with jQuery, maybe it's easier to solve it also with jQuery. Just make sure masonry is called after you insert the element. By after I mean Javascript's after, not just after in the code, see my example http://codepen.io/diogo-ed/pen/LVwRyB
  16. Thanks guys! I had this on my to do list, but got berried in the deep. It's fixes now with Mike's code. Thanks!
  17. $page->template returns the template object, wish is not equal to the string 'products'. Try this instead: if ($page->template->name == 'products')
  18. Read again
  19. I think this opinion by Chris Coyier is quite to the point https://css-tricks.com/the-trouble-with-preprocessing-based-on-future-specs/
  20. Google is taking too long to fix this. I'm trying Yandex metrica with success for now https://metrica.yandex.com/
  21. Like Soma said. For more details see here http://php.net/manual/en/language.types.string.php#language.types.string.parsing
  22. Try to set the image url to a variable first: $n = 0; $image_url = $page->images->first()->url; echo "{$image_url}<img src...
  23. Thanks @eze102! Could you tell in what device that happens?
  24. Assuming that your languages have the names "fr" and "be", and that you want to do this for a field named "body", you could loop through all pages with that field and do this: foreach($pages->find("body!=") as $p) { $page->of(false); $page->body_be = $page->body_fr; $page->save(); } See here: https://processwire.com/api/multi-language-support/multi-language-fields/#language-alternate-field-values And welcome to the forum!
  25. I actually need those 1000%, but only on desktop sizes. Removed it from mobiles sizes, should be fine now. Thanks for your help
×
×
  • Create New...