Page 1 of 1

How to display a particular entry ?

Posted: Wed Nov 02, 2005 4:40 pm
by pierre
I want to display a particular entry , how do I do that ?

Posted: Wed Nov 02, 2005 9:17 pm
by jhermanns
write it.

How to display a particular entry ?

Posted: Wed Nov 02, 2005 9:20 pm
by Guest
You seem very smart !

In fact it's not well documented how to get a special entry...
...and not so evident to write!

Posted: Wed Nov 02, 2005 9:43 pm
by Col. Kurtz
could you please tell us what you wanna do? with a little more info?

do you want the url to show only one entry?
do you want to write something special?

I dont understand yet.

Get a special entry (id) in the template

Posted: Thu Nov 03, 2005 12:04 am
by Guest
I just want to get an entry in the template file. Besides calling the php function to get it, how should I do to get this entry by a template variable - like {$entry.id} ?

Re: Get a special entry (id) in the template

Posted: Thu Nov 03, 2005 10:29 am
by garvinhicking
It seems you might want to use the "includeentry" ("Markup: Include entry data/templates/blocks") plugin.

Then you can add this in your entries:

Code: Select all

[s9y-include-entry:4711:body]
To show the body of entry #4711.

Hope I understood you properly.

Regards,
Garvin

Getting Entry

Posted: Thu Nov 03, 2005 4:03 pm
by pierre
Garvin,

Please look at http://info5765.infoweb-j.net

Do you see the title: 'info-une' at the top of page just beneath the toolbar?
ok...

What I need is print here a certain entry -that can change-

I thought I could do that in the 'entries.tpl' but I can't call php code (it doesn't print) so I dont know how to do it.

Re: Getting Entry

Posted: Thu Nov 03, 2005 5:10 pm
by garvinhicking
What you seem to be wanting to do is called "Sticky Entries". Install the entryproperties event plugin ("Extended properties for entries"), edit the entry that you want to show up at the top of your entrylist and look at the bottom of th page. There, check the button "Sticky Entry".

Best regards,
Garvin

plugin entry ?

Posted: Fri Nov 04, 2005 6:20 pm
by Guest
I don't find this plugin on the repository.

Can you send me the URL ?
thx

Re: plugin entry ?

Posted: Fri Nov 04, 2005 6:24 pm
by garvinhicking
The plugin serendipity_event_entryproperties is bundled with Serendipity > 0.8! So you already have it. There's no URL necessary.

It's exact name displayed in the plugin configuration installer is "Extended properties for entries". It's an event plugin. It might be called different in Non-English languages.

Regards,
Garvin

Print an entry

Posted: Sun Nov 06, 2005 2:10 pm
by Guest
Garvin,

Yes it works.
But not exactly as I wanted : the news at top should be replaced automatically by another that is checked asth new "top" one (à la une).

There is two news to edit to get this result now.

anyway it works
thx

Re: Print an entry

Posted: Sun Nov 06, 2005 2:21 pm
by garvinhicking
Yes, that's right, that's how sticky entries work. You could use smarty code to discard any sticky entries after the first one by assigning variables and checking if those have been set, and then skipping one item of the foreach loop if the variable is set.

Regards,
Garvin