Jump to content

add geomap inside a tab


Menelaos Demetriou

Recommended Posts

I display each field group in a jquery tab and I would like to add also the geomap inside a tab. I found this http://docs.reviewsforjoomla.com/How_can_I_show_the_Map_inside_a_tab in your documentation but I believe these guidelines are followed when you create the tabs manually.

 

How can I add the map inside a tab? Please note that in order to display each field group in a tab I made the following modifications in the detail.thtml file.

 

If you want to display each field group in a separate tab instead of the default field output, replace this code in the detail.thtml file:

 

<!-- CUSTOM FIELDS -->

<?php if(isset($listing['Field']['groups'])):?>

    <?php echo $this->element('custom_fields',array('entry'=>$listing,'group_name'=>'','page'=>'content','divWidth'=>'style="width:55%;"'))?>

<?php endif;?>

 

with this:

<?php

$groups = array();

foreach($listing['Field']['groups'] AS $group=>$fields){

    $groups[$group] = array($group=>$fields);

}

?>

<div id="jr_tabs" class="jr_tabs" style="width: 60%;" >

    <ul>

<?php $i=0;foreach($groups AS $title=>$fields):$i++;?>

<li><a href="#field_group<?php echo $i;?>"><span><?php echo $title;?></span></a></li>

<?php endforeach;?>

    </ul>

    <?php $i=0;foreach($groups AS $title=>$fields):$i++;?>

    <div id="field_group<?php echo $i;?>"><?php echo $this->element('custom_fields',array('entry'=>$listing,'group_name'=>$title,'page'=>'content','divWidth'=>'style="width:95%;"'))?></div>

    <?php endforeach;?>

</div>

 

Link to comment
  • 1 month later...
×
×
  • Create New...