Page 1 of 1
[gelöst] smarty abfrage?!
Posted: Tue Aug 03, 2010 12:50 pm
by nicmare
ich versuche mich gerade an einer eigentlich simple smarty abfrage. aber ich scheitere. ich möchte sowas in der art machen:
Code: Select all
{assign var=currentpath value=$gCms->config.root_url+$smarty.server.REQUEST_URI}
{if $one.detail_url == $currentpath}…{/if}
aber das zusammenfügen von den zwei smarty variablen in der ersten Zeile klappt natürlich nicht. wie macht man das?
Re: smarty abfrage?!
Posted: Tue Aug 03, 2010 12:59 pm
by nockenfell
Mach das doch mit capture:
http://forum.cmsmadesimple.org/index.ph ... 625.0.html
Code: Select all
{capture assign=currentpath}{$gCms->config.root_url}{$smarty.server.REQUEST_URI}{/capture}
Re: smarty abfrage?!
Posted: Tue Aug 03, 2010 1:03 pm
by nicmare
ah super. so klappts! nun habe ich endlich auch mal gelernt wofür dieses capture zeugs gut ist

Re: smarty abfrage?!
Posted: Tue Aug 03, 2010 1:03 pm
by Jos
Kann auch mit cat modifier:
http://www.smarty.net/manual/en/languag ... er.cat.php
Achte das die addresse nicht gut ist wenn du deine cmsms installation in eine Unterverzeichnis gemacht hat.
Re: smarty abfrage?!
Posted: Tue Aug 03, 2010 1:04 pm
by nicmare
danke euch beiden

Re: [gelöst] smarty abfrage?!
Posted: Tue Aug 03, 2010 1:39 pm
by hlf
Normal würde ich das so formulieren:
{assign var=currentpath value=`$gCms->config.root_url``$smarty.server.REQUEST_URI`}
Re: [gelöst] smarty abfrage?!
Posted: Tue Aug 03, 2010 1:40 pm
by nicmare
was es nicht alles gibt…
Re: [gelöst] smarty abfrage?!
Posted: Wed Aug 04, 2010 9:45 am
by cyberman
Tja ja, die Hochkommata wieder mal

...
Re: [gelöst] smarty abfrage?!
Posted: Wed Aug 04, 2010 1:10 pm
by hlf
Tja ja, die Hochkommata wieder mal
Eher Backticks - nachzulesen bei:
http://www.smarty.net/manual/de/languag ... quotes.php
Re: [gelöst] smarty abfrage?!
Posted: Wed Aug 04, 2010 3:35 pm
by cyberman
Sag ich (mein ich) doch

...