Jump to content

How to add Map in tableview list ?


mikkox

Recommended Posts

hello

 

I use Tableview mode for display listing and I would like add a fixed map (of dimension like something 700x300 px) at top OR bottom page before OR after pagination button.

 

By default only the Blogview mode use Map so it seem is required to customize the theme file listings_tableview.thtml...

 

I found in the blogview theme the follow code:

 

		<?php if($show_map == true):?> 

        <!--  BEGIN MAP -->
        <div id="gm_mapColumn">
            <?php echo $this->renderControllerView('geomaps','map_results',array('width'=>'300','height'=>'300'));?>
        </div>
        <!--  END MAP -->
	<?php endif;?>

 

I tried to put that code in listings_tableview.thtml but no map was displayed.. So I removed all IF statment and DIV tag and the map is now displayed... The only problem is the map float at top right...so I imagine is required to modify CSS for place the map where I want...

 

The map in blogview theme use the class "gm_mapColumn" who correspond to this code:

 

div#gm_mapColumn {
    position:absolute;
    top:0;
    right:0;
    height:100%;
    float:right;    
}

 

So I tried to put this CSS inside my file custom_style.css and adapt it for a while but without success (unfortunately I'm not a CSS guru)...and the map continue to move, appear, disappear...

 

1) Can you please tell me what is the right CSS code to use for place and fix the map at top or bottom page ??

 

2) Can you tell me how to use correctly the IF statment in the code for allow me to hide the map in case I change my mind by enabling/disabling the correspondent setting "Show map in list pages" in Configuration Overrides ??

 

I'm near to find the solution but after almost 2 hours I start to be bored...

 

Many thank for help..

Link to comment
×
×
  • Create New...