Hello folks,

I am completely stumped. I have spent hours trying to see how to theme those darn popups. Here is my setup.

I have CCK installed and a tpl file just for that node type. All works well with that and is working as I want it to (http://new.felixapartments.com/propertise/lafayette).

From my understanding of gmap node locations, those popups use whatever is used inside the .tpl file for the node type (if available). My map/node page shows all the nodes as needed but I can't get those popups to use a different layout than what the cck node type layout. It uses the same content that is found in the cck-node-type.tpl file.
http://new.felixapartments.com/map/node

Just to be sure everyone understands, I am not using the location block, as it does not load "all" the node locations. So my solution is needed for /map/node page.

So this is what I tried to do. Since gmap includes css and js when the map/node file is loaded, I created a var in page.tpl, simply looking for the word "gmap" within the $styles printout. Then in my cck-node-type.tpl file, I would look for that var to see if it is true. If so, then I give a different set of theme code, else, the normal theme code. For some odd reason, the var can't be picked up in the cck-node-type.tpl file. I have tried making that var a global in page.tpl as well and no go.

Does anyone else have a solution?

Thanks in advance!

Comments

elvis2’s picture

*bump*

texas-bronius’s picture

Nice work on your tutorial here:
http://drupal.org/node/130671
Those are some good looking popups.

Have you discovered how to theme gmap itself in terms of height/width, etc? Is it only dictated by the "default" settings in admin?

Also, your links above and in the tut referenced above are no longer there.. new == www.
--
shamelessly hijacking a solo thread as a targeted PM with a public audience.. hmm..

--
http://drupaltees.com
80s themed Drupal T-Shirts

scottrigby’s picture

Hi Elvis & Bronius,

Elvis, I'd like to learn how you themed your GMap popup on http://www.felixapartments.com/properties
Specifically, I'd like to know how you got your directions link in the popup window.
I've been reading through your posts from the spring, and responses from others. But I can't find how to do this?

I'm using a "Gmap View" to provide a map for a specific content-type (rather than properties, I'm making a map for "content type: restaurants").

In my view, I add fields (some which I made for my content-type using CCk, and some are automatically available from the Location module).
I can theme those in style.css, without having to do anything else.

But I can't see a way to add anything to this popup (like the map link) if there's not already a field for it.

Can I make a new tpl.php file for this view? If so, how? I tried the Views Theme Wizard, but it's only set up for list views - doesn't seem to offer support for Gmap views.

Do either of you have any advice? I'm banging my head against the wall on this one.
-Thanks

--
Scott Rigby
http://basekamp.com
http://PlausibleArtworlds.org

elvis2’s picture

Hello scottrigby,

Did you see my post here: http://drupal.org/node/130671

I explained how I created this...

Also, I did not use views at all. All within the tpl files. I also shared the code on that link above, so you can see how I added the directions etc.

Hope that helps,
Elvis