Smarty Forum Index Smarty
The discussions here are for Smarty, a template engine for the PHP programming language.
Probleme mit Smarty und einem Script

 
Post new topic   Reply to topic    Smarty Forum Index -> Language: German
View previous topic :: View next topic  
Author Message
crusard
Smarty n00b


Joined: 07 Nov 2013
Posts: 3

PostPosted: Thu Nov 07, 2013 9:54 am    Post subject: Probleme mit Smarty und einem Script Reply with quote

Guten Morgen,

ich habe folgendes Problem:

Ich möchte eine XML Datei via Javascript laden lassen, leider macht mir Smarty da ein Problem raus, da die Datei wie eine Smarty Anweisung geladen wird :/

Hier der Code des javascripty

Code:
<script type="text/javascript">
$('#portfolio').portfolioSetter({xmlSource:'portfolio.xml'});    
</script>


Smarty Meckert dann über die "{ }" also wie kann ich das ganze trotzdem laden lassen?
Back to top
View user's profile Send private message
Grizzly
Smarty Pro


Joined: 15 Apr 2011
Posts: 106
Location: Germany

PostPosted: Thu Nov 07, 2013 11:04 am    Post subject: Reply with quote

Du musst in Smarty den Literal-Tag verwenden, damit du in dem Block ohne weitere { und } verwenden kannst. Also sprich so:

Code:
<script type="text/javascript">
{literal}
$('#portfolio').portfolioSetter({xmlSource:'portfolio.xml'});   
{/literal}
</script>

_________________
BASE4U - Deine Meinung ist Wichtig!
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Smarty Forum Index -> Language: German All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP