简体   繁体   English

Drupal没有渲染方块视图

[英]Drupal is not rendering a block view

Good morning, 早上好,

I have a block named feed-empleo whose machine name I think it is "feed-empleo-block". 我有一个名为feed-empleo的块,我认为它的机器名称是“ feed-empleo-block”。 在此处输入图片说明

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". 它的网址是:/ admin / structure / block / manage / views / feed-empleo-block / configure,所以这就是为什么我认为它的机器名称是“ 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: 那是因为我认为它的类和ID应该是:

<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. 我一定做错了,因为div标签中没有任何内容。 But I am not really sure why isn't being shown. 但是我不太确定为什么没有显示。

Go to views -> advance -> Other -> Theme: Information and rescan your view template file from there. 转到views -> advance -> Other -> Theme: Information然后从那里rescan your view template file 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 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. 确保rescan template fileclear your drupal cache

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM