Sean it doesnt work
this is my code
class OkolicaMapaPage_Controller extends StronaPage_Controller {
function zajawka($zajawka) {
$x = str_replace("\n","<br />",$zajawka);
return $x;
}
}
$zajawka('$Zajawka'); making error:
Parse error: syntax error, unexpected T_STRING, expecting ')' in C:\Windows\Temp\silverstripe-cacheC--serwer-strony-nd\.cacheC..serwer.strony.nd.themes.noclegi-dobczyce.templates.Layout.OkolicaMapaPage.ss on line 31
<script type='text/javascript'>
var mapa;
var geo;
function mapaStart() {
if(GBrowserIsCompatible()) {
mapa = new GMap2(document.getElementById("mapa"));
mapa.setUIToDefault();
mapa.enableScrollWheelZoom();
mapa.setCenter(new GLatLng(49.97065584042108,19.90997314453125),9);
geo = new GClientGeocoder();
<% control OkolicaPage %>
var adres = '$Title';
$zajawka($Zajawka);
//var zajawka = '$Zajawka;
geo.getLatLng(adres,function(punkt) {
var marker = new GMarker(punkt,{title: adres});
//marker.opis = adres;
mapa.addOverlay(marker);
GEvent.addListener(marker,"click",function() {
//marker.openInfoWindowHtml(marker.opis);
});
return marker;
}); <<<<<<<<<<<<<< THIS IS LINE 31 <<<<<<<<<<<<<<<
<% end_control %>
}
}
</script>
<h2>
<% control OkolicaHolder_tytul %>
$Title:
<% end_control %>
</h2>
<ul class="reg_menu">
<li class="jasna">
<% control OkolicaMapaPage_tytul %>
<a href="$Link" title="$Title">Mapa</a>
<% end_control %>
</li>
<li class="ciemna">
<% control OkolicaHolder_tytul %>
<a href="$Link" title="$Title">Lista miejscowości</a>
<% end_control %>
</li>
</ul>
<div id="box_jasny">
<div class="btop"></div>
<div class="bcont">
<div id="mapa" class="okolica"></div>
</div>
<div class="bbot"></div>
</div>
<div class="clear"></div>