{# {% for module in modules %} read JSON file in controller and pass it to here for each module in modules we need that path thing below path('meailproject) #} {% for moduleName in moduleNames %} {% endfor %} {# //get company from database //some mysql query, fill in later //check who is logged in and pull from their table $company = "company_1"; $jsonfile = file_get_contents('company/'.$company.'/_templates.json'); $company_details = json_decode($jsonfile, true); $templateNames = array_keys($company_details['templates']); foreach($templateNames as $module){ $folder = 'company/'.$company_details['company']."/"; switch($module){ case "events-build": case "freeform":$popup = "popup";$link=$folder.'index.php';break; default:$link=$folder.$module.'.php';$popup="";break; } echo ' '; } #}