I would like to start by appologising for what may seem the obvious.
I am still learning drupal, but would ask for some help.
Currently on the route page I have the map on the left and the route on the right. I would like the route to be under the map.
If you are to explain how I can do this in very simple terms if possible that would be great.
Thankyou very much
Comments
Comment #1
hutch commentedYour theme should have a template.php, copy the function theme_getdirections_show() from getdirections.theme.inc to your template.php, renaming it appropriately, eg from theme_getdirections_show mythemename_getdirections_show where 'mythemename' is the name of your theme. Then change the following:
to
What this does is rearrange the table so that it produces two rows with one datacell each instead of one row with two datacells.
Make sure you flush the theme registry when you have made the changes, the devel and admin_menu modules are helpful for this.
Comment #2
pmflav commentedWorked perfectly. Thankyou very much for the instructions, have tried a couple of other little tweaks using your guide and they also worked great.
Thankyou very much for taking the time to explain and show me this.
This is why I love the drupal community.
Comment #3
blamege1 commentedHow is accomplished in drupal 7? I really need to move the directions results under the map. Any suggestions?
Comment #4
hutch commentedGetdirections in D7 has the same theme functions as D6, just follow the instructions in #1
Comment #5
blamege1 commentedGot it, much appreciated. I was forgetting to close out the initial $rows[] = array(
Comment #6
bporter2387 commentedHere's the updated code for Drupal 7. It turns you you need $mapid but it was stripped out in the README
Comment #7
hutch commentedI will update the README for 7.x-3.x to reflect this, thank you for reporting this.
Comment #8
modiphier commentedHello,
There is no such file getdirections.theme.inc in drupal 7 version?
Comment #9
hutch commentedThe file getdirections.theme.inc was removed a while ago, the functions in it can be found in getdirections.module. I have updated the README.txt
Comment #10
vlooivlerke commentedHow can I make the map and directions responsive. If it was not in a table but div's it would have been much easier to do. What I want to do is have the directions on the right on a desktop screen and on the bottom on a mobile screen.
Comment #11
hutch commentedFollow the instructions in #1 and edit the code so that the lines in 'data' are wrapped in divs instead of being themed as a table, give the divs unique ids or classes and control them with css so that they lie side-by-side on wide screens but above and below on narrow ones. You should be able to do this with something like this
This example is from getdirections-7.x-3.x, edit to suit whatever version you are using.
Comment #12
vlooivlerke commentedAwesome, thanks allot. @hutch