• Willkommen im Geoclub - dem größten deutschsprachigen Geocaching-Forum. Registriere dich kostenlos, um alle Inhalte zu sehen und neue Beiträge zu erstellen.

Template: Bilder-Pfad-/Dateinamen exportieren

t31

Geowizard
ließe sich eine Möglichkeit schaffen auch den Pfad oder nur den Dateinamen von Bildern (auch von mehreren), welche im Image-Reiter angezeigt werden per Templat zu exportieren?
 
OP
t31

t31

Geowizard
habe jetzt ein wenig herumexperimentiert: mit dem HTML-Export wird die page.tpl benutzt und da gibt es
Code:
<tmpl_loop cacheImg>
    <tmpl_var FILE>
</tmpl_loop>

leider lässt sich das nicht verschachteln und auch LAT und LON gehen nicht beim HTML-Export, nur LATLON.

Ich bräuchte so etwas in der Art
Code:
<tmpl_loop cache_index>
   <tmpl_if IMAGES> 
      <tmpl_loop cacheImg>
         <wpt lat="<tmpl_var LAT>" lon="<tmpl_var LON>">
             <name><tmpl_var __COUNTER__><tmpl_var NAME></name>
             <cmt><tmpl_var DECRYPTEDHINTS></cmt>
             <link href="<tmpl_var FILE>"/>
             </wpt>
      </tmpl_loop>
   </tmpl_if>
</tmpl_loop>


Zum __COUNTER__ habe ich leider auch noch nicht soviel gefunden.
 

arbor95

Geoguru
habe den htmlexporter mit
LAT, LON, SYM und GSTYPE erweitert.
Siehe auch die template Dokumentation.


Loop context variables
If you set loop_context_vars to true in your Template's constructor, then you will have access to five special variables in all your loops. These are:
__FIRST__ True for the first run of the loop, false otherwise
__LAST__ True for the last run of the loop, false otherwise
__ODD__ True for every other iteration of the loop - a loop starts at 1
__INNER__ True if both __FIRST__ and __LAST__ are false
__COUNTER__ Which iteration is currently on. Starts at 1

You may use these like any other <TMPL_VAR> inside your loop.
 
Oben