Usually you should use the slot like this in the action view:
slot('breadcrumb', $links);
And then in your layout.php:
<?php if(has_slot('breadcrumb')): ?> <?php include_component('modulename', 'breadcrumb', get_slot('breadcrumb')); ?> <?php endif; ?>
Essentially, slot uses a special namespace in the context (or perhaps its answer ... some sfParameterHolder instance somewhere, hehe) as a registry of slot names / values, so the solution you were thinking about is already implemented :-)
source share