Jump to content

diogo

Moderators
  • Posts

    4,296
  • Joined

  • Last visited

  • Days Won

    79

Everything posted by diogo

  1. It's the last time that I say this, but $page->parent->get("name"); should be wire("page")->parent->get("name");
  2. If I would live in California it would also be a no-brainer for me, but in Europe we pay the double unfortunately...
  3. For the mac talk part — just solved two things that I had in linux and was annoying me not to have them in the mac: not being able to define the default apps for all extensions in one place, and that the + green button wouldn't really maximize the windows http://www.rubicode.com/Software/RCDefaultApp/ http://www.blazingtools.com/right_zoom_mac.html
  4. Go on, you can replace it on your post, I don't mind
  5. It's a good idea. Here is the link to the module http://community.invisionpower.com/files/file/6253-mentions/
  6. @Winfredable did you forget to mention Pocesswire in your specialities? I'm afraid I will have to mark your comment as spam if you don't give some kind of justification. edit: @Winfredable, thanks for changing your post, better like this.
  7. I'm paying for adobe cloud because of inDesign, there's not really an alternative to it (no, Scribus is not production ready unfortunately), but inkscape really is a great alternative to illustrator just as Gimp is a great alternative Photoshop. Sketch is also an excellent and affordable alternative.
  8. Looks great Nico! Two issues, though: I get a double scroll on the very right and there is no padding on the bottom of the main area
  9. If you use svg, make sure the text is NOT converted to outlines, or the image will be a massive size. Best way is probably to embed the font with the subsetting preference "Only Glyphs Used" from saving panel in Illustrator.
  10. Not like it is now. But it's still a valid exercise, change only a little bit and the function can become very useful function selector($tpl) { return wire("pages")->find("template=$tpl, limit=2, sort=company"); }
  11. That's strange... I tried it, and works normaly: function selector() { return wire('page')->children(); } echo selector(); // echoes 1001|1003|1005|1006|1020
  12. I don't know what is the intended result, but, as Martijn said, $selects holds a PageArray, and now, so does selector(). You have to treat it as one: foreach( selector() as $s ) echo $s->title;
  13. if you only return the result inside the function instead of echoing, you have to echo the function itself: //functions.php function selector() { $selects = wire("pages")->find("template=child-template, limit=2, sort=company"); return $selects; } //mytemplate.php echo selector(); // <- echo here
  14. You can't use the API variables inside functions because of function scope. Use wire() instead $selects = wire('pages')->find("template=child-template, limit=2, sort=company"); Here's an explanation: https://processwire.com/talk/topic/5133-wire-function/?p=49459
  15. @pwired this is a very specific need, and needs to be addressed like so. It will never be possible to have formatting compatibility for every software out there, right? As Adrian said, SVG would be an option, but will you have the right fonts for every label, and if so, is it worth the overhead of loading them all? I think in your case, I would have the raw text (not formatted at all, and no layout) and a picture of the label.
  16. How clever do these people sound to you? http://www.blackhatworld.com/blackhat-seo/white-hat-seo/672816-whitch-web-engine-should-i-choose-my-niche.html
  17. Hi Franko, try this: <a href="<?=$c->url;?>">
  18. Thanks Alan! I corrected the mistake. Apparently the awesome guy doesn't know his own URL
  19. I don't think that works. You can use any selector though so this should work: if ($page->parents->has("name=by-usage")) { This is also fine: if ($page->find("name=by-usage")->count()) {
  20. A simple way is to use a "members" page with url segments. This page would be a normal page on the frontend, but would accept segments with the user names www.example.com/members/username. In your template you would do something like this: $username = $sanitizer->name($input->urlSegment1); // make sure the user input can be a page name $userPage = $pages->get("template=user, name={$username}"); // get the user with this name if(!$userPage->id) throw new Wire404Exception(); // if this user doesn't exist show the 404 page echo "<p>the name of this user is {$userPage->title}</p>";
  21. I have read this very quickly and also have to answer quickly. For what I understand what you want is "manual creation date" if exists OR real creation date if not: echo $page->get("manual_field|created");
  22. Or you can be more specific in your selector: template!=directors|staff
×
×
  • Create New...