Now that blocks support two titles - the admin label and the display title, choosing between them got a bit vague.
{block:Featured Content}
... where I had Industry Featured Content, Supplier Featured Content, Consumer Featured Content as different blocks.
I'm not on a patch environment right now, but I changed reptag/tags/block.tags like so:
function _block_by_title($subject, $module = 'block') {
$list = module_invoke($module, 'block', 'list');
foreach ($list as $key => $block) {
// seach by either admin block label or blocks display label
if($block['info'] == $subject){
$block = module_invoke($module, 'block', 'view', $key) ;
return $block;
}
$block = module_invoke($module, 'block', 'view', $key) ;
if($key == $subject){
return $block;
}
if($block['subject'] == $subject){
return $block;
}
}
}
This, first match is on the admin block title (guaranteed to be unique) and the second on the public name - which may happen when displaying similarly titles stuf but with different content in different contexts.
Probably a rare case, but I needed it for todays job.
Just listing it here for ref, I'll roll a patch when I can.
In other news, The node-edit help doc has simply stopped showing up for me - the legend expands to nothing, although the utility works.
It may be to do with my theme, I'll look into it as I go.
Comments
Comment #1
profix898 commentedThere are some issues with RepTag for Drupal 5 I need to take care of first ... so I will revisit this issue after Christmas ...
Comment #2
dman commentedno hurry. i just posted this for ref. Ialso had to tweak more to allow more than one tag per line. still in testing
Comment #3
profix898 commentedAre there any updates on this topic? I plan to release reptag 1.2 in a few days (weekend?) and I'd really like to include your modifications. Maybe I will move the code into a new embed.tags to support embedded views, blocks and nodes etc.
Note: Shouldnt it be
return theme('block', $block);instead ofreturn $block;only. I havent tried that yet ...Comment #4
profix898 commentedUpdate committed to Drupal-5 branch. Please reopen this issue if you got more updates ... Thanks so far.
Comment #5
(not verified) commented