Drupal 7 - 删除div

时间:2015-04-13 10:43:13

标签: drupal-7 drupal-views

我想将结果显示如下:

<div class="mainmenu">
<h2 class="sidebar1">Main Menu</h2>
<ul>
  <li><a href="#">this is a dummy link 1</a></li>
  <li><a href="#">this is a dummy link 2</a></li>
  <li><a href="#">this is a dummy link 3</a></li>
  <li><a href="#">this is a dummy link 4</a></li>
  <li><a href="#">this is a dummy link 5</a></li>
  <li><a href="#">this is a dummy link 6</a></li>
  <li><a href="#">this is a dummy link 7</a></li>
  <li><a href="#">this is a dummy link 8</a></li>
  <li><a href="#">this is a dummy link 9</a></li>
  <li><a href="#">this is a dummy link 10</a></li>
</ul>
</div>

但是,我在D7中看到,结果中添加了一些额外的div,并且没有出现UL类。请检查D7呈现的以下结果:

&#13;
&#13;
<div class="content">
<div class="view view-test1 view-id-test1 view-display-id-block view-dom-id-2e7dd9ae3682d3d6e095a22755b506c0">
            <div class="view-header">
      			<div class="mainmenu">
			<h2 class="sidebar1">My Pages</h2>    </div>
        			<ul>
        
          				<li>page 1</li>            
          				<li>page 2</li>            
          				<li>page 3</li>      
				</ul>
    
 			<div class="view-footer">
      		</div>
	</div> 
</div>  
</div>
&#13;
&#13;
&#13;

你可以帮我删除drupal添加的额外div作为默认值吗?

1 个答案:

答案 0 :(得分:1)

您可以在“视图”设置中关闭一些额外标记,但如果这还不够,则必须修改用于渲染视图的模板。