Tuesday 18 March 2008 12:02:21 pm
well, ideally
{$menu.url}
Should be context aware and in case when object is Link class instance it should just return location instead of link to that node. This naturally could be configurable. Less perfect solution, but what would also save some typing, is if structures returned by treemenu operator would contain ezcontentobjecttreenode object so I wouldn't have to fetch it manually. Another useful feature of teemenu operator would be to allow for more complex filtering like in case fetch/list operator. It happens frequently that I need to filter elements out by priority. This also cannot be easily achieved at the moment so again I need to fetch node object manually, compare priority and do something basing on the outcome of comparison. I think generally fetch/list operator is really robust, would be really helpful to have treemenu little closer to that one. One more question not completely related to this topic. I'm not familiar with implementing new operators, but from what I saw I think you need to always implement it in PHP. Is there a way to implement some operator using template language? I'm thinking of some kind of operator I could implement which would internally use treemenu but do some stuff around it like what I described above with URLs or priorities and reuse it later in different places. Would be nice to be able to do it using template language as I (and probably most of other people) know it better than internal PHP API of eZ publish.
|