Mapper Template


Posted on 07 June 2006 by jose

I created a Page Template for the Tiga theme I'm currently using. I'm calling it Mapper, because it's the hook that will load my Google map page once I upgrade to the new API. Basically, I copied Tiga's page.php file and added an include to the PHP file that will actually load the map.

What complicates matters is my plan to move Wordpress from a subdirectory to the root of the domain. Google Maps API requires a key that is directory-specific. This means I have to generate two new keys (one for hackwater and one for the localhost), but for which directory? My Apache mod_rewrite magic means my permalinks are all pretty; it also means that my (static) pages appear to be folders, with the directory name keyed on the name of the page (i.e. http://www.hackwater.com/map/ for a page called map).

If I create an actual directory with the same name as the page, Apache tries to serve the index for that directory and ignores the page itself. But if I create a directory with a different name, will Google know that even though the URL for the map is the page, the files calling forth the map is a different name? Tricky. Trial and error right now is difficult, because the map won't load until I update it and figure out which files my scripts are trying to load (the problem here is server path vs. URL path; PHP uses server and JavaScript uses URL, so I'm occasionally confusing the two when PHP is loading a JavaScript file containing JavaScript which is trying to load a PHP file that generates XML).

Whew. At least the Page Template is in place.

Latest poll

Which do you favor?

Choices

Twitter