Override add-on block template (ie: tweetcrete) in my new theme

Permalink 2 users found helpful
How can I override a non default block in my template, I have already overridden autonav, page_list and search, but I cannot do this with an add-on block like tweetcrete.

aberbenni
 
PatrickHeck replied on at Permalink Reply
PatrickHeck
Hi aberbenni,

it depends on what you want to do. But if you're planning to change the output template just copy it from:
packages/jereme_tweetcrete/blocks/jereme_tweetcrete/view.php
to:
blocks/jereme_tweetcrete/view.php
Any changes you make in the latter one will be used to dispay the block.

Best
Patrick
aberbenni replied on at Permalink Reply
aberbenni
Thanks, is it possible to work in my theme folder?
Like:
/packages/my_theme/blocks/jereme_tweetcrete/view.php
ScottC replied on at Permalink Best Answer Reply
ScottC
Yes
/packages/my_theme/blocks/jereme_tweetcrete/templates/your_new_template/view.php

Someone else can chime in on this but I don't think a view.php simply in a package override would work.

If you want to do this site-wide, i would look at in your theme's areas:

function setCustomTemplate($btHandle, $temp);

so $a->setCustomTemplate('jereme_tweetcrete','your_new_template');
$a->display($c);

you might have to play around with the second arg with .php or not being included in the file.
aberbenni replied on at Permalink Reply
aberbenni
Thank you all, this works for me.