Jump to content

Soma

Moderators
  • Posts

    6,808
  • Joined

  • Last visited

  • Days Won

    159

Everything posted by Soma

  1. ROFL apeisa!!! You spoiled it Almost felt from chair reading this
  2. Sorry teppo!
  3. You need to do. $page->reapeatname->imagename->url; Sorry maybe you already did? Also the x100 image is most surely from the thumbnail in the admin. Edit: If it's a multiple images field you have to iterate them or using $array->first()->url; it's in a array. $repeater->images->first()->url should then give the first image.
  4. What Apeisa sais is also how I feel exactly. If you find yourself repeating over and over you're doing it wrong. I developed a style over the last 10-12 years where I need less and less very little CSS and thin code, it payed a lot and saved me a lot of time also from the experience of all the browsers and especially IEs. But lately it has and will shift with the whole new palette of browsers evolving, devices, displays, tv's (next?) bandwidths etc. I remember where we followed ~50kB rules for a page. And it would be still possible in that range, and we can use lots of new techniques aswell. Requirements are different now and I felt less or sass brings in what CSS maybe missing and I find it really refreshing having the possibility there if really needed. Not the big part maybe. I've been using it in some projects to try and was quite happy to be able to define some stuff and it really allows for very different workflows which is pretty cool if you think about it and play around with it. Not creating another dependency is I think the important part here. If a team really is trained to use a defined workflow and they have fun doing so it sure can help on really big and complex projects.
  5. Only... I lol as if it were something less. *sssssasss*
  6. I think I need a debugger to understand what you're doing. jk Not sure what your setup is exactly. Template in PW or php file? ...
  7. My bet is you looked at wrong installation.
  8. I use the .less apps http://incident57.com/less/ (mac, pc also is available elsewhere), that converts to regular CSS when saving (watching files), you can also set it to minify them. I'm not a fan of serverside or js runtime. It's basicly great tool to help using variables and mixins etc to write css.
  9. Not sure if slkwrm's code is really right but I guess. Can you also try if ($child->isHidden()) { echo "I'm hidden!"; } else { echo "And I'm visible!"; } Also take a look in mysql "pages" table and look at the "status" field what bit mask it has. I think there's something else involved we don't see or know here. For example how have you created the site, pages exactly are they imported? If they're marked as hidden in the admin it should really work in frontend. Have you other code in your templates that could cause this? Any special modules installed? There's nothing wrong with what you're doing at all.
  10. It's "swiss made" quality!
  11. Not sure what it's about, but you could debug it using isHidden() http://processwire.c...filter=isHidden and see what status they really have. As for the sorting it can have different reasons, not sure though. Try reorder the pages so it get updated (last to first pos). Also you can use the sort=sort selector on the children.
  12. Thanks for pointing out. I always leave it out as it's optional in HTML5. From W3C: "The "type" attribute is required in HTML 4, but optional in HTML5."
  13. Awesome! I also wanted to do something similar but didn't really get into it. Looks very nice! Thanks for posting. Would you mind to put it on modules.processwire.com and create a repository on github?
  14. not really, in the init no page is loaded yet, but you could try to put it in loaded() or was it ready() function maybe or a hook from in the init().
  15. It's not about the user I think but context.
  16. Nico, you could also use following to check if in backend. if($page->template == "admin") { .. } Or another way when using a hook function, for example function myhook(HookEvent $event) { $cur_page = $event->object; if($cur_page->template == "admin") { ... } }
  17. Something like this can be used to create a new PageArray $somepages = $pages->find("template=news, limit=10"); $parray = new PageArray(); $parray->add($somepages); // add one page (or also multiple since 2.2.2) // or $parray->import($somepages); // add one or multiple pages from another PageArray $parray->sort("-modified"); ... Edit: If you have an array with id's that's also cool: $ids = array(1002,1004,2303,4342); $parray = new PageArray(); foreach( $ids as $id ) $page->id ? $parray->add( $page->get($id) ) : continue ;
  18. I don't think there's a "PW way". I think most limits as far as those techniques goes regarding PW is because the developer (Ryan) isn't using those workflows so it may not ready to do everything and it may not working/supporting all workflows and standards (which for myself also don't really use or care), not saying this can't be adapted to do so. I'm sure Ryan will be pleasant to help doing changes if there's any issues with it that PW gets in the way.
  19. What do you want to debug? I have to say I have no clue about PHPStorm and XDebug. I think this has not much to do with PW rather than your IDE and PHP. DO you mean a local runtime environement? I think without having PW context there (not plain php) it doesn't really make sense, and something you do while coding templates -> testing in browser, if error go back and check, fix, continue. There's also debug option you can enable in /site/config.php to see errors and warnings. Edit: I think your struggle is also little selfmade, I've never needed autocomplete for something like PW, or debug, lint or anything, just for coding php websites, rarely really have the need as it's so simple. What I sometimes use is a phplint to spot errors in php code right away, but mostly it's just annoying and slows IDE's down.
  20. Yep, it's now updated on directory.
  21. Thanks Adam, didn't really notice somethings wrong (wrong method name) when recently adding version to scripts. It's fixed in latest commit. You should be able to install it sucessfully.
  22. Hover the title instead.
  23. Soma

    ProcessWire on the web

    In german and on a WP Blog . Thanks Michael! http://www.perun.net/2012/08/08/das-kleine-feine-cms-processwire-reduzierung-aufs-wesentliche/
  24. Soma

    Codesense

    Actually this topic might be better:
  25. I often type some random chars into the .htaccess to see if a 500 (?) is thrown, which helps to see if htacess is really working/enabled.
×
×
  • Create New...