Hello my friends
I try to use insert_views that presented as block
but them title did not appear- just the content get appear.
please help me to get display the views_block title.
thnx and best regards

Comments

bdwelle’s picture

Title: view_block title doesnt appear » view_block title doesn't appear
Category: support » feature

I ran into the same problem myself. I solved it by patching insert_view.module

-    return str_replace($mtch, $repl, $text);
+    $out = '<h2>'.$view->get_title().'</h2>';
+    $out .= str_replace($mtch, $repl, $text);
+    return $out;

...but I'm wondering why the module wouldn't output the title by default? Seems like a good idea to me.

math_1048’s picture

yes for me too :) seems not inserting but embed , and thank you very much for your patch
best regards

pasqualle’s picture

Status: Active » Closed (works as designed)

The view title is not printed by the views module. It is the block title which you see when you put a view block into region.
If I would include this patch then someone would create a bug report because the view title is printed. If you need the view title printed you should override the theme template file of your view, and put this code snippet there.

j0nathan’s picture

Hi,
Do you think it could be a good idea to print the title only if we need it?
Something like this:
[view:my_view=my_display=1,2,3=print_title]

pasqualle’s picture

Status: Closed (works as designed) » Active

adding any more settings to insert_view does not seem right to me

pasqualle’s picture

Status: Active » Closed (won't fix)