0
votes

Good morning,

I have a block named feed-empleo whose machine name I think it is "feed-empleo-block". enter image description here

Its url is: /admin/structure/block/manage/views/feed-empleo-block/configure, so that is why I think it's machine name is "feed-empleo-block".

In my node template, I am using:

<div class="block block-feed" id="block-feed-empleo">test</div>

That is because I think its class and id should be:

<div class="block block-{module}" id="block-{module}-{delta}">   

So, finally, I have created a templated named:

views-view--feed-empleo-block.tpl.php

I must be doing something wrong because there is nothing in the div tag. But I am not really sure why isn't being shown.

1
Go to views -> advance -> Other -> Theme: Information and rescan your view template file from there. and you can see your custom template there. Check this link for proper info drupal.stackexchange.com/questions/11468/… - hardik solanki
Hi Hardik, If this is it... i.imgur.com/2upvngD.png Does that mean that I should use views-view--feed-empleo.tpl.php ? - Cod1ngFree
Yeah but make sure you rescan template file and clear your drupal cache as well. - hardik solanki
Have you clicked on THEME: Information and checked whether your theme file is being used or not? Check this ostraining.com/blog/drupal/views-templates - Romisha Aggarwal
@hardiksolanki Could you add an answer in order to accept it? - Cod1ngFree

1 Answers

1
votes

Go to views -> advance -> Other -> Theme: Information and rescan your view template file from there. and you can see your custom template there.

Check this link for proper info:

https://drupal.stackexchange.com/questions/11468/create-template-file-for-views-block

Make sure you rescan template file and clear your drupal cache as well.