Something unique to be used inside every entry?

Random stuff about serendipity. Discussion, Questions, Paraphernalia.
Post Reply
danhsmile043
Posts: 1
Joined: Wed Jun 13, 2018 9:41 am

Something unique to be used inside every entry?

Post by danhsmile043 » Fri Jun 15, 2018 10:46 am

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?

User avatar
onli
Regular
Posts: 2265
Joined: Tue Sep 09, 2008 10:04 pm
Contact:

Re: Something unique to be used inside every entry?

Post by onli » Fri Jun 15, 2018 11:28 am

In https://github.com/s9y/Serendipity/blob ... ntries.tpl there is the $entry_id variable you could use, or is that the wrong file?

User avatar
yellowled
Regular
Posts: 7084
Joined: Fri Jan 13, 2006 12:46 pm
Location: Eutin, Germany
Contact:

Re: Something unique to be used inside every entry?

Post by yellowled » Fri Jun 15, 2018 6:25 pm

That's exactly what {$entry.id} is for.

Code: Select all

<div id="box_{$entry.id}">…</div>
YL
amazon Wishlist - Serendipity-Podcast (German only, sorry)

williampeterson
Posts: 1
Joined: Thu Nov 21, 2019 3:35 pm

Re: Something unique to be used inside every entry?

Post by williampeterson » Thu Nov 21, 2019 3:42 pm

custom writing wrote: ↑
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?
You may take a look at the documentation for better understanding: https://docs.s9y.org/docs/developers/themes.html

Post Reply