Drupal - Google Map

Posted on 2013-05-09
Last Modified: 2013-05-11
I can't make this work.

I build a block. See attached san_antonio_block.txt. This is the EXACT content of the block in FULL HTML.

Then I look at it. It looks like the attached loc_page_rendering.jpg.

Obviously, I want the text in the left most column aligned to the top; I CANNOT make it happen. I really don't want to use tables, I used divs with flush left & right, it (Drupal) completly erased all the content. At least in this case it kind of get's it.

When I reopen the block, Drupal has changed it & eliminated the "valign="top" on the left table column. In addition, it wipes out the following from the Google map.

<iframe width="425" height="350" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src=

I have to put that back in every time.

Can someone help?

Question by:Richard Korts
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 7
  • 3
  • 3
LVL 13

Accepted Solution

Arrow_1 earned 500 total points
ID: 39154259
The best way to do it would probably be to eliminate the table, then wrap your iframe in div tags and float that div to the right. If you do an inline style directly in the div, then you'll have to use the PHP filter rather than the Full HTML filter. The Full HTML filter removes some things like inline styles, while the PHP filter does not. If you don't see an option for the PHP filter, you'll need to enable the php filter module.
LVL 17

Expert Comment

ID: 39154923
Have you set the text format to Full HTML? It's the first drop down box under where you add the content.

Author Comment

by:Richard Korts
ID: 39155768
To all,

When I open the block to edit, it appears as attached. Note that FULL HTML is selected in the dropdown. The <iframe ... tag is eliminated as is the <td valign="top">. I switch to plain text editor, reapply those things & save. It does not work. I will try the php Filter.

If I can figure put how to do it.
[Webinar] Code, Load, and Grow

Managing multiple websites, servers, applications, and security on a daily basis? Join us for a webinar on May 25th to learn how to simplify administration and management of virtual hosts for IT admins, create a secure environment, and deploy code more effectively and frequently.


Author Comment

by:Richard Korts
ID: 39155803
To arrow_1

I found no module PHP Filter. I did Google search, found this:

I downloaded the gz version, tried to install as a new module,

It gives me the attached.

LVL 13

Expert Comment

ID: 39155825
That's not the correct module... The one you need already comes with Drupal. It's in the list of core modules on the modules page.

Author Comment

by:Richard Korts
ID: 39155872
To all,

I found the PHP Filter & enabled it & set permissions.

Result still the same.

It DOES now keep the html formatting (valign="top" & iframe). The iframe looks good, the rest the same.

I'll try with styled divs.

FYI, the problem with all this is it takes days to do a simple page; every time I delve into this it presents new challenges.  I have heard that once you learn it, Drupal makes it easy.

I could have done all 8 locations with maps PERFECTLY formatted in the time spent so far with one not done.

I am once again 2 inches from trashing Drupal & doing this the "old fashioned" way.

Author Comment

by:Richard Korts
ID: 39156359
To all,

Can I include css styles in a block like styles can be included in a normal html page?

Like in the attached?
LVL 13

Expert Comment

ID: 39156379
Yes... Just be sure to use the php filter.

Author Comment

by:Richard Korts
ID: 39156897

I did it & it looks like this:

I'm guessing it's all the <style> stuff that cause all the extra spacing at the top? Do you think so?

I can make all that in-line; what a pain.

Also, I THINK I know how to add my own css file in this theme; I MIGHT try that first.


Author Closing Comment

by:Richard Korts
ID: 39156967

I'm stunned!!
LVL 17

Expert Comment

ID: 39157003
What works? Your own CSS?

Author Comment

by:Richard Korts
ID: 39157298
Yes, my own css & redoing the entire page using divs instead of tables,

The Theme developers suggested doing it like this, which I did (Option 1):
in case you would add new css file in to the theme. I did option 1 because 2 didn't seem to work (yesterday). FYI, this guy had the wrong location for the php file but I found it.


open /sites/all/themes/centum/templates.php
add this code line
drupal_add_css($theme_path . '/css/local.css');

underneath of

drupal_add_css($theme_path . '/css/centum.css');

1/ in /sites/all/themes/centum/ add this

stylesheets[all][] = css/local.css

so file local.css you must save under "css"
2/ follow the URL hit "clear all caches"

I hope this helps,

Best regards

LVL 17

Expert Comment

ID: 39157930
This way of adding your own CSS must be some proprietary thing with with theme. I have never had a problem with doing it the way I suggested.
The problem now is if there is an update to this theme, and you use it, you will lose all of your changes. So be careful with that.

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
How long does it take to style a page like this in Drupal? 9 457
change fields order in Drupal 7 register form 4 910
Drupal 7 Commerce Rules - Stop Duplicate item 15 1,341
mini panels 2 407
This article is for those that are having major problems with users upload files such as pictures to their profile. The solution is simple and has to do with correcting the directory paths. With some experimenting and testing i got it fixed. Note…
RTL (right to left) web applications aiming for audiences speaking languages like Hebrew or Arabic, are generally more complicated than the same applications aiming for audiences speaking Latin based languages. The main difference lies of course …

751 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question