In CLinkColumn there’s the very useful urlExpression and labelExpression. They are very useful since they are evaluated at runtime, in context of the specific record(=model object) handled at that iteration (when building a grid for example, with CGridView).
What I’m missing is the same dynamic capability for imageUrl property. I’m rendering an “articles” table where each article has its category. Categories are stored in another table and relationship is defined. Everything works fine with evaluation of “this” article’s category name, which is used dynamically with labelExpression, but I cannot do the same for the category’s icon. For that, I need this capability.
This thread is therefore to request such a feature: have something like imageUrlExpression that will be used in much the same way as labelExpression.
The task at hand looks simple enough so I’ll do it and post here the outcome for your review.
Your comments are welcomed…
Boaz.