Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 06/16/2012 in all areas

  1. I tried to integrate parts of another site with ProcessWire today, and quickly gave up, as my existing (older) site has a bunch of classes in the global namespace that collide with some very generic class-names in ProcessWire: Database, Config, Session, Page and so forth. Would you consider introducing support for namespaces? Perhaps in ProcessWire 3.0, as clearly this would break backwards compatibility with the current API. Simply placing PW classes in a vendor-namespace (e.g. "wire") would probably be sufficient to avoid 99% of collisions. I think it would be great if PW-modules followed the "{vendor}\{package}" namespace convention for modules, as this eliminates practically all namespace collisions. Both conventions are compliant with the PSR-1 recommendation - though vendor-name is the minimum required, but I think that's fine for the framework itself. A "smart" IDE like PHP Storm could probably refactor most of the codebase to use namespace more or less automatically. If you're interested, I also have a script somewhere that rewrites entire codebases to namespaces, picks up folder-names and maps those to namespaces as configured. (it's not complete, but would probably get you roughly 971/4% of the way...)
    1 point
  2. Nice example in the "Wire" templating language
    1 point
  3. You're welcome. Haha, don't hurt yourself please! Just for throwing in when using php "Wire"-tag ( ) short notation the above could also be something like this. <? foreach( $pages->get("/about/")->children() as $pa ) : ?> <h2><?= $pa->title ?></h2> <? if( count( $pa->teasers ) ): ?> <ul> <? foreach( $pa->teasers as $rp ) : ?> <li><?= $rp->element_title ?></li> <? endforeach ?> </ul> <? else: ?> <p>No entries found</p> <? endif ?> <? endforeach ?> (short tags needs to be enabled on server, but only few hostings have it disabled. In near future it will always be enabled in php5.4)
    1 point
  4. Just as a short note (sites are not much more than standard PW installations) www.grahm-anderson.de (lawyer, responsive layout) www.factoring-pool-mittelstand.de (Factoring means selling bills which are overdue to a bank) The latter uses the redirect url module for relocating old urls and Soma's navigation module. More to come soon.
    1 point
×
×
  • Create New...