Jump to content

Roberts R

  • Content Count

  • Joined

  • Last visited

Community Reputation

8 Neutral

About Roberts R

  • Rank
    Jr. Member

Recent Profile Visitors

1,134 profile views
  1. Hello Is there a way to got timestamp from FieldDatetime? Like $page->event_start->timestamp? Lets say that I have datetime field that have following format 'd/m/Y' and I'm trying to get week number from given field. $datetime->date('W'); (returns : 01) but $datetime->date('W',$page->start_date) (returns: 03) but should be same. There is workaround, but that just seems too much 🤨 $datetime->date('W', $datetime->stringToTimestamp($page->event_start, 'd/m/Y'));
  2. Hello. I never though about it before but when I insert image into CKeditor field I don't get ALT tag filled from image that has it. Do I have to do it manualy for inserted image or Im doing something wrong?
  3. Yea.... not sure. Issue went away without reason that I could tell. And now I can't reproduce it as well. Thanks for response regardless.
  4. if ($page->$field) { // do stuff } else { // skip } should do the trick. if you have some Pagearray fields then check if field is array and it has count() > 0 then do stuff
  5. I have simple page structure: category subcategory simple-product simple-product simple-product simple-product subcategory .... category2 so Im at category page and running $pages->find("template=simple-product, has_parent=$page, limit=8"); and it returns 0 pages but this returns 4 pages $pages->find("template=simple-product, has_parent=$page"); Can someone explain why limit does not work here? EDIT: So I did some tests and it seems that any limit=n where n is >= actual page count that is possible ... selector return 0 results.
  6. Roberts R


    Just to let you know. Link on homepage does not work.
  7. To use this with php7.2 you have to change list($unit, ) = each($units); $unit = key($units) in Number.php line 293. As "each" function is now DEPRECATED
  8. Ah this is what I can use when running Ajax (last part). Thank you as well.
  9. echo WireRenderFile('child', ['page' => $child]); Learnt something new. Thanks. Could not find it in Api reference. Or I don't know how to look for it.
  10. Ok let me try again. My config file : $config->useMarkupRegions = true; $config->prependTemplateFile = '_init.php'; $config->appendTemplateFile = '_main.php'; Child template in ./templates/child.php <div class="child"> <div class="image" style="background-image:url('<?=$page->backgroundImage->url?>')"></div> <div class="description"> <h3><?=$page->title?></h3> <p><?=$page->smallDescription?></p> <div class="price">CHF <?=$page->price?>.-</div> </div> </div> Hanna code : <?php foreach ($page->children('template=child') as $child) { echo $child->render(); } ?> parent template is just : <main pw-replace="main"> <?=$page->body?> </main> And question is how do render child without "_init.php" and "_main.php"?
  11. As im statring to use $config->useMarkupRegions = true; I'm starting to run in things I can't figure out. In body field I have hanna code inserted that renders some of children and children have template. When rendering children they include $config->prependTemplateFile = '_init.php'; $config->appendTemplateFile = '_main.php'; for all rendered children. Is there a way to render without them?
  12. Thanks. List for Latvian language.
  13. Can someone point me to the way how to fix title to name? so "ā" becomes "a" and so on. see attachment
  14. network error is the trigger. And sometimes its easy to trigger. Just got report from client that he have same issue. Opening any part on admin site in new tab fixes it. refreshing/logout does not. Is there a way to perm fix? Talking clients to use PW over WP was struggle ... this does not help as it happens when I present PW
  • Create New...