Jump to content

WillyC

Members
  • Posts

    326
  • Joined

  • Last visited

  • Days Won

    8

Everything posted by WillyC

  1. Bern hard u.can does $wire->addHook('/mymodule/{foo}/{bar}(/{baz})?/', function($e) { return "<pre> foo: $e->foo bar: $e->bar baz: $e->baz "; }); @ bern berna hard @ @bernhard
  2. how.abt u use $cache 2 do jus do it. 1once per hour ? echo $cache->get('topic-count', 3600, function() use($topics) { $str = ''; $strategy = pages()->get("template=genre, name=strategy"); foreach($topics as $topic) { $count = pages()->count("template=game, genre=$strategy, topic=$topic"); $str .= "<li>$topic->title: $count games</li>"; } return $str; }); also.2 make faster u better should uses "id" not name, so "topics" no 'topics.name' and "genre" not genre.name etc. othrwis pw have to look those up for u (?) every time of foreach @rjgamer
  3. @MSP01 1.. pw cachis any.thing it load, so no.many how times u.cal $page->feld or $page->parent->smoga or $page->feld->bilpa --- it load feld or smoga or bilpa 1 time....... if autojoinin for.feld smoga or bilpa then it load it with th 1 queery that loader page 2) yes 1 sql to loader template=settings page and 1 sql to loader somesetting. ifs somesetting.feld is autojoinin then 1 sql for both. if u.cal eithers template=settings page agains or somesetting agains then alredy loadeded so no xtra sql unless u $pages->uncacheAll() whch clearys it all 3- may be. autojoinin can makes littel small faster but at cost of memry .use autojoinin only for.felds that u accessor on.evry load of $page. title good one to be.autojoinin ......most othrs not;;; body or images and most betters not autojoinin
  4. u.can do on anyee page template like .this if($config->ajax){ // u do.ajax $data=['status'=>'ok', 'massage'=>'hi whirld']; header('content-type: application/json'); echo json_encode($data); exit; }else{ // u.do html }
  5. super user.s required to create fielders y templatos purposefulness of super user this.is with out such purpose is not.super
  6. no argumentas needeed what.u wants is event->return wire()->addHookAfter('Page::render', function (HookEvent $event) { $page = $event->return; });
  7. $page->find()start from $page if $page != home { $page->find( 'parnet=/blog/' ) will.alwayse return NO things } so >>> u.must use $pages->find() noT $page->find() !! OAR u can.uses $pages->get('/blog/')->children( 'limit=3, include=all' ) if usesing $pages say shits bout array it mean yoU write-over it some where >>> u did a $pages = array some.where ! fix that.or u can uses wire( 'pages ')->find(' you.selectoro stuff here '); or functiones api pages()->find( 'selectros in this' ) amen
  8. wire( 'sanitizer')->entities( $u->title ) => $url . $u->id, wire( 'sanitizer')->entities( $u->request_type->title ), wire( 'sanitizer' )->entities( $dog_ref->title ) => $url . $dog_ref->id, wire( 'sanitizer' )->entities( $mailer->name ), ... "<a href=''>Schváliť</a>", // u NO.entitties on this.ones
  9. looks.ikes u w ant $table->setEncodeEntities(false);
  10. u want.to set for.use serveors timezine no client not big prolem if.u set wrong
  11. here.u go echo $pages("parent=/")->implode('<a href={url}>{title}</a> ');
  12. template=airport|city, title|body%=air u donut need.Airport bcoz u got %=air template=airport|city, title|body%=air, title%=USA template=airport|city, title|body%=air, title%=USA, id!=[title%=nyc] or.in pw v3 u can do template=airport|city, title|body%=air, title%=USA, title!%=nyc
  13. sorte all.by price ? text=a|b, sort=price sorte.by text thens by price ? text=a|b, sort=text, sort=price
  14. it.not matter donut look.at tables just use.it ? work for me pw store utf8 like idn that need .only ascii
  15. thats.sound like hole diffrnt cms no ? WirePress why sholud pw main stream ? pw is seaworthy.vessel not canooe for stream
  16. i dunno.twig butt i try answer neway for.theis port echo $twig->render('promocoes/index.twig.html', array( 'promocoes' => $promocoes, )); where $promocoes comes.from ? can u.show code for thats ? try remove.this {% if promocoes %} and {% endif %} try removes "key," from {% for key, promocao in promocoes %} alsos look.u have unclose span tag <span> Nº {{promocao.getnumero}} </span <--need close! -=-=-edito-=-=- nm. > <!-- found.it
  17. lost koberoaki bcoz he ask how.to do w/pw i.ansor more for "cylng lots pages" then "sum lotso pages" uses.either for sum butt uses my codes if u.might needs more todo
  18. can u.better shloud poste code samplos ? when squegee local.systemos use no.outputs formoatting $page->of(false); u ca also checks ferst if value than.outputs if($page->description){ print $page->description;} else{ print "descriptions no";} with u uses.twig ? i dunno ifsos mabe uses outputs fomatting $page->of(true); can.check w if($page->of()){/*has foratting*/}else{/*not.does have*/} ok ? or : no
  19. $sum=0; $start=0; $limit=1000; do{ $mypages=wire('pages')->find("start=$start, limit=$limit, $myselector"); print "processng pages.frm $start<BR>"; foreach ($mypages as $mypage) $sum += $mypage->amount; wire('pages')->uncacheAll(); $start+=$limit; }while($mypages->count());
  20. include("/home/shutterblue/public_html/content/index.php"); $wire->pages->setOutputFormatting( true ); // u cansadd.this when boot trap $homepage = $wire->pages->get(1);
  21. ovis u post.here same thng 3 yrs same ,,bug,, nobodys ever else seen peoples helps u ands u.no replys if u needs help.go back und first reply to peoples.thet helpd u here https://processwire.com/talk/topic/3363-image-field-description-not-saving/ and.here (!) https://processwire.com/talk/topic/11102-image-fields-stop-saving-descriptions-after-a-while/page-2
  22. u.haves anee caches ? likes tamplate cache on ?
  23. edit u. index.php file + add 2 top on.line afters namespace $_SERVER['REQUEST_URI']=str_replace('index.php','',$_SERVER['REQUEST_URI']); when.u no needs index.html no more rember to deletex that ok
×
×
  • Create New...