0

When creating a basic page, then previewing that page, here is a sample mark-up from the browser:

    <article typeof="foaf:Document" about="/?q=who-we-are" class="node-30 node node-page view-mode-full clearfix">
  <div class="field field-name-body field-type-text-with-summary field-label-hidden"><div class="field-items"><div property="content:encoded" class="field-item even"><ul><li><img src="http://drupal-dev.ngi-dev/sites/default/files/default.jpg"><p>Name</p>
<p>iOS &amp; Android Developer</p>
</li>
</ul></div></div></div>
</article>

I had pasted the basic html ul/li/dl etc in the source code view using the ckeditor, saved then viewed the page in a browser.

Don't know why a <p> tag was wrapped around content within established html tags but my main question is where to find what template that is adding the <article> tag as well as the nested structure of the extra <div> tags

I've looked in the template files within modules and Zen (my parent theme) but I haven't found anything yet. Where is the <article> tag being generated? I think that would help me find the full mark-up.

  • You said "previewing". Is the tag also there when the node is posted? – No Sssweat May 15 '15 at 20:07
  • Did you ever find a solution for this? I'm having the same problem in drupal 7, using a Radix sub-theme. Even running find . -name "*php" -exec grep "article.*clearfix" "{}" \+ in the root directory and removing all instances of clearfix doesn't solve the problem.. – naught101 Mar 7 at 9:49
  • urgh, don't mind me. I had copy-pasted some HTML into a node body, and that had the article tag inside it -_- – naught101 Mar 7 at 9:52
0

I always clean that part in node.tpl.php, that's the default template for nodes if you don't have one for each content type. So i would try changing the article tag for a div tag on that file. You can make sure that it works cleaning all caches from your Drupal

  • well, that's just it, in my node.tpl.php file, there is no (article) tag. But the html output is an actual article tag so I'm trying to find out what template is rendering that. Could there be some function that actually generates html? – kelly johnson May 15 '15 at 19:58
  • @No Sssweat asked this too... you said that you get the article tag when you are previewing the content... do you get it when you save it? maybe Drupal is using another template file to show your preview, probably the template file from your administration theme – xstean May 18 '15 at 15:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.