Hello everybody.
I have a list of buildings that I load from my model. Those buildings are showed in a loop within my view as so :
Controller
public function index() {
$data['buildings'] = $this->Base_Model->getUserBuildings();
$this->load->view('game', $data); }
View
<?php foreach($buildings as $b): ?>
<div class="building">[...]</div>
<?php endforeach; ?>
Each build has a few "actions" possible such as "info", "price", "color". the default state shows the "info".
I want to be able to load a specific action for a specific building.
For example I have a factory and a drugstore, by default both show the "info" tab. How to, if I click for the "price" tab of the drugstore, show the "info" tab for the factory AND the "price" tab for the drugstore ?
My URLs looks like these :
default one
site/buildings
show price of the drugstore
site/buildings/price/drugstore
Maybe I should look for a partial view solution but I really need an advise or a solution ;)
Thank you very much in advance (I apologize for my bad English too)