Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 370
  • Last Modified:

Drupal - Google Map

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?

Thanks
san-antonio-block.txt
loc-page-render.jpg
0
Richard Korts
Asked:
Richard Korts
  • 7
  • 3
  • 3
1 Solution
 
Aaron FeledyDrupal Developer and ConsultantCommented:
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.
0
 
nanharbisonCommented:
Have you set the text format to Full HTML? It's the first drop down box under where you add the content.
0
 
Richard KortsAuthor Commented:
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.
0
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.

 
Richard KortsAuthor Commented:
To arrow_1

I found no module PHP Filter. I did Google search, found this: http://drupal.org/project/viewsphpfilter

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

It gives me the attached.

Help!!
cant-install-phpfilter.jpg
0
 
Aaron FeledyDrupal Developer and ConsultantCommented:
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.
0
 
Richard KortsAuthor Commented:
To all,

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

Result still the same. http://rkassoc.org/amc/content/san-antonio

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.
0
 
Richard KortsAuthor Commented:
To all,

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

Like in the attached?
div-test.htm
0
 
Aaron FeledyDrupal Developer and ConsultantCommented:
Yes... Just be sure to use the php filter.
0
 
Richard KortsAuthor Commented:
Arrow_1

I did it & it looks like this: http://rkassoc.org/amc/content/san-antonio

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.

Thanks.
0
 
Richard KortsAuthor Commented:
It WORKS!!

I'm stunned!!
0
 
nanharbisonCommented:
What works? Your own CSS?
0
 
Richard KortsAuthor Commented:
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.

OPTION #1

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');

OPTION #2:
1/ in /sites/all/themes/centum/centum.info add this

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

so file local.css you must save under "css"
2/ follow the URL http://your-site.com/admin/config/development/performance hit "clear all caches"

I hope this helps,

Best regards

Toan
0
 
nanharbisonCommented:
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.
0

Featured Post

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

  • 7
  • 3
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now