tpr

Members
  • Content count

    1,501
  • Joined

  • Last visited

  • Days Won

    28

tpr last won the day on December 21 2016

tpr had the most liked content!

Community Reputation

1,866 Excellent

1 Follower

About tpr

  • Rank
    Hero Member
  • Birthday 06/21/1980

Contact Methods

  • Website URL
    http://rolandtoth.hu/portfolio

Profile Information

  • Gender
    Male
  • Location
    Budapest, Hungary
  • Interests
    sports, spaghetti, portable applications, and spaghetti

Recent Profile Visitors

4,780 profile views
  1. Perhaps this could work in twig templates too - in ready.php add this: $view->bd = function($data) { bd($data); }; then use this in twig files: {{ $bd('hello world') }}
  2. module

    I do not use this module but these mods are looking great. How about adding the labels to the left of the fields? that would make the form look less crowded and easier to overview. I'm not sure whether the markup allows easy style update.
  3. Maybe $e->replace = true? But I would use Tracy Debugger to find out what's going on.
  4. Another alternative could be having a "<parent />" element inside the "header", just like in template engines. This would be replaced with the header contents you have set earlier. You could use this element as the first or last one inside the header, or anywhere else. Because of such issues wrote I earlier that I find this approach similar to blocks in template engines. But if it's so, PW should borrow existing solutions from those.
  5. Perhaps using indentation for nested fields could be more clear and space efficient instead including fields inside fields, what do you think? Or is such level of modification out of scope for now?
  6. Module

    Experiment with pagelist counters (CSS only):
  7. Do you get these values on the same server (same PHP version)?
  8. v033 is available that contains two new filters, lazy and surround. I like the succinctness of the surround filter, eg in case of a tag list: {$p->tags->sort('name')->title()|surround:'li'|surround:'ul class="tags"'|noescape} <ul class="tags"> <li>one</li> <li>two</li> <li>three</li> </ul> The docs were moved to GitHub Wiki, the increasing number of filters required this.
  9. I think it's similar to twig's parent(): http://twig.sensiolabs.org/doc/2.x/functions/parent.html
  10. Module

    Thanks! That was a silly mistake, interestingly noone spotted it, including me v125 is uploaded with the fix.
  11. Module

    I think I got it - I've refactored the submodule enabled state to a function but haven't updated it everywhere, will commit a new version soon. Update - @Macrura could you test if this solves the issue? AdminOnSteroids.min.js
  12. Module

    Could you check the Body field settings? Re-saving the field may fix this. My idea is to make a hard reload, config.js often gets cached. What have you upgraded and to what version?
  13. Thanks, good suggestion, I haven't thought about this. Although for newbies it can be harder to understand. It works in Latte too but I'll keep the 'default' filter as it's easier to use, especially when chaining filters: {($page->title|replace:'Home','') ?: 'No content available.'} {$page->title|replace:'Home',''|default:'No content available.'}
  14. Just added a new filter 'default' (v031) - this seems to be a nice shortcut for simple if-else conditions. <div> {$page->product_description|default:'No description is available for this product.'} </div> I guess the core PW API could also use something like this: $page->get('product_description', 'No description is available for this product.') What do you think?
  15. I like this approach because of less number of template files. Sometimes I end up with 10+ templates and it gets duplicated because of the view files. Keep in mind that you should use ready.php (or another one) to act as a controller if you still need to separate concerns. There you can use conditionals to target the current template or even include another php files if needed - I often include files eg. in case of the search template to keep ready.php less crowded.