Page 1 of 1
No Entry Body in Extended Body
Posted: Mon Feb 06, 2006 7:13 pm
by dakira
Hi,
any quick way to get the above mentioned behavior? The thing is: We use the Entry Body as a teaser for the article. When people click on "read more" it is kinda stupid that the teaser gets repeated because they already read it and clicked on "read more" to get the full story.
I haven't written any plugins, yet. But if someone pointed me in the "right direction" I'd be happy to do so. Unless someone else did that already, that is.
Cheers
dakira
Re: No Entry Body in Extended Body
Posted: Mon Feb 06, 2006 7:21 pm
by garvinhicking
You can do that quite easily by editing the "entries.tpl" template.
Currently it looks like:
Code: Select all
<div class="serendipity_entry_body">
{$entry.body}
</div>
{if $entry.is_extended}
<div class="serendipity_entry_extended"><a id="extended"></a>{$entry.extended}</div>
{/if}
modify that to:
Code: Select all
{if $entry.is_extended}
<div class="serendipity_entry_body"></div>
<div class="serendipity_entry_extended"><a id="extended"></a>{$entry.extended}</div>
{else}
<div class="serendipity_entry_body">{$entry.body}</div>
{/if}
Have fun,
Garvin
Posted: Mon Feb 06, 2006 7:41 pm
by dakira
Cool thx! I wasn't sure where to look.. I tried the index.php.
Anyway, wouldn't it be a good idea to do something like this as a plugin, so that we don't have to do this modification every time we update the blog?
After all an integrated option like "display entry body when reading full article" would be a nice idea
For now this hack will do it, though *g*
Thanks again and cheers
dakira
Posted: Mon Feb 06, 2006 8:00 pm
by garvinhicking
Hi!
This cannot be solved with a plugin, as it is a templating issue. This is much more the place where things like that belong to.
And Serendipity has been like this the past 3 years and I think it's gotten common for s9y users; I don't want to add a bloated config option, when I think it is quite well in a template?
I really don't consider this to be a hack - it is the usual template customization...
Regards,
Garvin
Posted: Mon Feb 06, 2006 8:18 pm
by dakira
Yeah sorry.. I figured that out when I was customizing the template that such issues are what templates in fact ARE for

So forget what I wrote above.
While I'm at it. Is there any documentation on what variables are allowed in templates for s9y?
dakira
PS: haven't seen you online on ICQ lately *g*
Posted: Mon Feb 06, 2006 8:23 pm
by garvinhicking
Hm, there is no 100% documentation for all smarty variables, so you'll have to check out the PHP files in include/functions_smarty.inc.php for example.
Some of them is documented in our Wiki, of course. If you have the time, and find new variables, please insert them in the Wiki so that others can document it (or you could insert them if you figured out what they are - most of them are named easily)
I'm online with ICQ most of the day! But I have turned off the online web-indicator.
Regards,
Garvin