Something unique to be used inside every entry?

Random stuff about serendipity. Discussion, Questions, Paraphernalia.
Post Reply
Mekk
Regular
Posts: 54
Joined: Tue Jul 22, 2008 7:53 pm
Contact:

Something unique to be used inside every entry?

Post by Mekk »

I am editing entries.tpl. And I'd like to add something unique inside every entry. Sth like

<div id="box_343"></div>

where 343 is different for every entry. Entry id would be perfect, but from the docs it seems it is not available. Does there exist any alternative?
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Something unique to be used inside every entry?

Post by garvinhicking »

Hi!

The ID should be available es {$entry.id}. It is only available within the main entries foreachloop, but at that place you should be able to easily add a wrapping <div>. Simply insert it after the second {foreach} loop.

HTH,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Post Reply