Jump to content

Roberts R

Members
  • Posts

    44
  • Joined

  • Last visited

Everything posted by Roberts R

  1. What I'm missing here? Why does "is empty" does not work? seo_description is multi-language textarea field.
  2. Its not or I'm not aware of how that would happen for tests I did before posting. I'm always up for learning Does the trick. It seems that defining variables this way should be done in config.php file. Either way thanks for help. ?
  3. Hello. I'm having little trouble with setup. Having global variable in _init.php and not being able to access it? $test = "test"; function text() { global $test; return $test; } and using this function in templates returns null. What i have to do is create function that I use in templates. This function does some checks based on global value and returns string. Maybe there are other way to implement it?
  4. 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'));
  5. 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?
  6. 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.
  7. 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
  8. 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.
  9. Just to let you know. Link on homepage does not work.
  10. 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
  11. Ah this is what I can use when running Ajax (last part). Thank you as well.
  12. 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.
  13. 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"?
  14. 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?
  15. Thanks. List for Latvian language.
  16. Can someone point me to the way how to fix title to name? so "ā" becomes "a" and so on. see attachment
  17. 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
  18. Got this issue again. Disabling uBlock did not help. This is just so random
  19. Firefox. No console output. It not like I put addon and then it stopped - only have addblocker. It just happened when I browsed admin panel at random time. Cleared history/cache. I can login with chrome - and it works fine. EDIT : I managed to fix it for me somehow : Video of issue. https://eroot.tinytake.com/sf/MjI5NTEyMl83MDQ2MzQz
  20. Does anyone have issues when sometimes PW does not load page tree? I have came across with all PW versions I have used. I can't open "Sākums". I try to refresh. There is no dropdowns from Setup/Modules/Access. EDIT: this didn't help : "To fix it i have to logout - but only from mobile version since User menu does not popout" Sadly I can't replicate it.
  21. Ah. Dumb me. I changed wrong property. Auto "memory_limit" blame. Thanks.
  22. Trying WordpressMigrator "File hokejablogs.wordpress.2018-01-08.xml is 5880279 bytes which exceeds max allowed size of 2097152 bytes" I can't find the way to change max upload size.
  23. Thanks @adrian for solving this atm. Issue related to : Installing "SessionHandlerDB" module solves it.
×
×
  • Create New...