[mapguide-users] changing task frame position
Jason Birch
Jason.Birch at nanaimo.ca
Fri Nov 3 04:10:24 EST 2006
Yes, but it's not easy. To do so, you will need to understand how the current templating system works.
How the template system works is that the mapviewer files use the sprintf() function to do variable substitution into a static text file, and output that as HTML. I'll give an example for the PHP mapviewer. In this case, the mainframe.php file figures out a bunch of stuff like the size of your frame, whether you want the task frame to show, and some other stuff. If you do want the task frame to show, then it calls some code around line 435 that swaps a whole bunch of variables (20) into the framesettaskbar.templ file.
To move the task pane to the left side, you will need to both modify the "framesettaskbar.templ" file (it's in www\viewerfiles\) and the mainframe.php file (it's in www\mapviewerphp\).
First, you have to change the HTML template in the framesettaskbar.templ file. You need to change the order of the "taskArea" and the "maparea" framesets, and also change the "cols" definition in their containing frameset from "*,%s" to "%s,*" so that the task area's width comes first.
Next, you have to change the order that the variables are replaced into the template in the mainframe.php file. For this, you will need to find the line that looks like "if($showTaskBar)". A couple lines down from that, is the call that generates the frameset that includes the task bar. Take "$toolbarHeight+1,", "$srcTaskBar," and "$srcTaskFrame," and move them up until they are between the "$taskWidth," and "$toolbarHeight," variables in the sprintf() call.
Finally, you'll need to do something with the styling to make the task pane stand out from the legend/properties.
Hope this helps,
Jason
________________________________
From: Kencana
Sent: Tue 2006-10-31 11:21 PM
To: users at mapguide.osgeo.org
Subject: [mapguide-users] changing task frame position
hi all,
is that possible to change the position of the task pane to the left side
instead of right side (original position)?
if yes, can I know how to change it?
Regards,
Kencana
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/ms-tnef
Size: 5078 bytes
Desc: not available
Url : http://lists.osgeo.org/pipermail/mapguide-users/attachments/20061103/3eddc90b/attachment.bin
More information about the Mapguide-users
mailing list