racke / Template-Flute

Template::Flute - Modern designer-friendly HTML templating Engine
Other
11 stars 12 forks source link

no dotted notation accessors for list param #71

Closed SysPete closed 9 years ago

SysPete commented 9 years ago

Within list iterators it is sometimes necessary to be able to use the same dotted notation for accessors as is available for 'value' in order to be able access all data. This example is from IC6 Demo Shop where I want to be able to pull data from related User table when traversing Message iterator:

    <list name="reviews" class="review-single"
        iterator="product.top_reviews">
        <param name="review-rating" field="rating"/>
        <param name="reviewer" field="author.name"/>
        <param name="review-date" field="created" filter="date"/>
        <param name="review-content" field="content"/>
    </list>

This is clearly not supported since DBIC is receiving "author.name" as a method name:

Can't locate object method "author.name" via package "Interchange6::Schema::Result::Message"
racke commented 9 years ago

Yeah, that makes sense.

racke commented 9 years ago

Done.