Custom template for block

Permalink Browser Info Environment
Hey -
I'm calling the testimonials block from a page template and I can't get it to use a custom view template. Here's my code:
<?php
$bt = BlockType::getByHandle('defunct_testimonials');
$bt->render('templates/custom1');
?>

What am I missing?
Thanks in advance.

Type: Discussion
Status: New
hypnotoad
View Replies:
defunct replied on at Permalink Reply
defunct
Hey,

Where did you put your custom1.php file?
hypnotoad replied on at Permalink Reply
hypnotoad
I don't have a file named custom1.php... It's a template that's here:

/blocks/defunct_testimonials/templates/custom1/view.php

This template works when applied to the block's "custom templates" menu... Should it not work when calling the 'render' method?
defunct replied on at Permalink Reply
defunct
Try

/blocks/defunct_testimonials/templates/custom1.php
hypnotoad replied on at Permalink Reply
hypnotoad
That seems to have worked! Many thanks for your help.
When I had created custom templates before I thought it had to be that path/format... "[root]/blocks/block_name/templates/template_name/view.php"
So, did this change at some point in the last couple years? Or is this something unique to packages as opposed to regular blocks?
defunct replied on at Permalink Reply
defunct
hypnotoad replied on at Permalink Reply
hypnotoad
Cool, thanks again!

concrete5 Environment Information

Browser User-Agent String

Hide Post Content

This will replace the post content with the message: "Content has been removed by an Administrator"

Hide Content

Request Refund

You have not specified a license for this support ticket. You must have a valid license assigned to a support ticket to request a refund.