> ... logic consists of several parts: > * How many ads to display > * Different ad sources / search commands > * Different positions > * Different offset's depending on ads shown at an earlier stage (e.g. "if > we've shown ads 1-3 from source1 in template1 then show ads 4-5 in template2") > * Source precedence. (e.g. "if we have ads from source1, show those. If not, > show ads from source2, ...) > > As far as I know there's no (good) way of moving this kind of logic > into views.xml. A similar approach as for enrichments would be nice, > where one can define positions for enrichments, and have > EnrichmentDirective figure out if a given enrichment should be placed > at a given position.
You are free to implement your own Directive in genericno.sesam.no mimic'ing the EncrichmentDirective's functionality or written from scratch to suit the logic required. Is any of the needs actually business logic? eg the connections between different sources. If so a RunHandler could be implemented. Can the logic around the different offset be implemented with extending the PagingNavigationController, or implementing your own offset navigation? then template1 when displaying ads 1-3 could set current offset for template2's result list to 4. this way template2 need not know anything about template1 and can render in an uniform way. Note that you should be able to have multiple PagingNavigationControllers all against the one command's result list. (If this is not the case please file an improvement!) Tabs in views.xml can have custom parameter key-values, this lets you define extra properties on a per vertical/tab basis. You could also define custom properties more extensively in a custom extended offset navigation controller. ~mck -- "Physics is to math what sex is to masturbation." Richard Feynman | semb.wever.org | sesat.no | sesam.no |
signature.asc
Description: This is a digitally signed message part
_______________________________________________ Kernel-development mailing list [email protected] http://sesat.no/mailman/listinfo/kernel-development
