Hard code cart links block

Permalink
I'm trying to hard code the cart links block in a header we have for the cart. I'm trying the following, but it's not working (nothing is rendered):

<?php
  $bt = BlockType::getByHandle('cart_links');
  $bt->render('view');
?>


Is it possible to hard code this block, like it is with, say, the autonav?

 
jero replied on at Permalink Reply
jero
Kind of.

Unfortunately in order to get the block to do anything, you would need to set the various properties such as
$bt->controller->showCheckoutLink etc, but they are all protected properties that you can't mess with -the controller will complain.

However, if you create a custom view, and set the properties in the view to the values you want, then it mostly works.