Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6601813
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T18:48:06+00:00 2026-05-25T18:48:06+00:00

I’m new to Drupal theming and am attempting to create a custom theme template

  • 0

I’m new to Drupal theming and am attempting to create a custom theme template for a specific content type I have.

I am attempting the following:

<div<?php print $content_attributes; ?>>


    <?php print render($content['field_property_media']); ?>

    <div class="field-label-above property-information">
        <div class="field-label">Property Information</div>
        <?php print render($content['address']); ?>

    </div>

</div>

However, when the content actually render the address portion gets booted out of its parent div and looks like this:

<div class="field-label-above property-information">
    <div class="field-label">Property Information</div>

</div>
<div class="field field-name-field-property-address field-type-addressfield field-label-inline clearfix"><div class="field-label">Address:&nbsp;</div><div class="field-items"><div class="field-item even"><div class="street-block"><div class="thoroughfare">55 Duchess Ave</div></div><div class="addressfield-container-inline locality-block"><span class="locality">London</span>&nbsp;&nbsp;<span class="state">Ontario</span>&nbsp;&nbsp;<span class="postal-code">N6C 1N3</span></div><span class="country">Canada</span></div></div></div>

I can’t figure out why this is happening or what the solution is to keep the address within the div I manually created.

Thoughts?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T18:48:07+00:00Added an answer on May 25, 2026 at 6:48 pm

    The only possible way this could happen is if you’ve got a custom or contributed module intercepting your template file and changing it, or if you have some javascript enabled that’s moving the <div> out of it’s container. Drupal does absolutely no re-ordering of content when it processes a template file so it can’t be anything in Drupal core that’s causing the problem.

    If the <div> is just displaying outside the container (i.e. it’s inside when you inspect the source code) then you’re probably just facing a floating issue; just add the clearfix class to the containing element.

    EDIT

    Just a thought, have you cleared your cache since you added the template file? If not, do that, it won’t be picked up until the caches are cleared.

    Also if this is a custom node template (i.e. node–page.tpl.php), make sure you’ve also copied node.tpl.php to your theme’s folder. Then clear your cache again.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Basically, what I'm trying to create is a page of div tags, each has
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
I have a jquery bug and I've been looking for hours now, I can't
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have just tried to save a simple *.rtf file with some websites and
this is what i have right now Drawing an RSS feed into the php,
I want use html5's new tag to play a wav file (currently only supported
I have a French site that I want to parse, but am running into
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.