Page 1 of 1

modifying the output format of an archive

Posted: Thu Sep 22, 2005 2:21 am
by pierre
I want to modify the output of the page archive - the {$entry.link} var in entries.tpl .

How do I do that ?

Re: modifying the output format of an archive

Posted: Thu Sep 22, 2005 1:48 pm
by garvinhicking
What exactly do you want to modify?

The Variable $entry.link is assigned in PHP-scope, namely in the include/functions_entries.inc.php file, function serendipity_printEntries(). But you usually do not need to edit that variable.

Regards,
Garvin

Link {$entry.link}

Posted: Thu Sep 22, 2005 2:26 pm
by pierre
What I want exactly modify is the result of printing this specific link when on e clicks on it it - in fact the page of the link entry for instance: I want to modify the content (in the middle) of this page : news

I didn't find any template to do this, and I dont find in code where this page is builded.

Re: Link {$entry.link}

Posted: Thu Sep 22, 2005 2:41 pm
by garvinhicking
You can modify the content of those pages by editing the "entries.tpl" file. If your template does not contain such a file, look at the templates/default/entries.tpl file.

With that you can change the look of an entry! Hope that's what you meant, I'm still not so sure :)

Regards,
Garvin

Modifying the page of en entry

Posted: Thu Sep 22, 2005 2:47 pm
by pierre
I want to just modify just the printing of the entry not the template of the first page.

Re: Modifying the page of en entry

Posted: Thu Sep 22, 2005 2:57 pm
by garvinhicking
Sorry, can you make a screenshot or post HTML code how it currently looks like and how you want it to look like? I don't understand what you want to do.

Regards,
Garvin

html

Posted: Thu Sep 22, 2005 3:06 pm
by pierre
So for now its like this:
actual

and I would:
that

Re: html

Posted: Thu Sep 22, 2005 3:37 pm
by garvinhicking
Okay, now I understand.

You have to do that in the same file, the entries.tpl file. There you can edit and change the things.

Look at the top of your entries.tpl file, there you see all the Smarty HTML markup. You seem to have already modified your text, so now you can place your HTML markup code inside that Template, like:

Code: Select all

            	<div id="texte{$entry.id}" style="display: block;">

				   <div class="body">
	                <p>
	                <!--StartFragment --> <p>{$entry.body}</p>
	                	                <a id="extended"></a>
	                	                </p>
	               </div>

Regards,
Garvin

extended

Posted: Thu Sep 22, 2005 3:49 pm
by pierre
Ok - I know how to modify the body in the template, yes -
but I don't want the first page to be modified, just the sigle entry

precision

Posted: Thu Sep 22, 2005 3:52 pm
by pierre
I don't want to modify
first page

but I would modify the entry in
http://info5765.infoweb-j.net/index.php ... roops.html
to get
this

... ?

Re: precision

Posted: Thu Sep 22, 2005 4:43 pm
by garvinhicking
Yes, I know. :)

You must see the entries.tpl as a central template file that is repsonsible for BOTH views on entries:

1. The general overview page
2. The detail page.

You can see smarty syntax that checks for "if {$is_single_entry}". Those places are responsible for the view when you are in the single entry. :)

So just make some modifications within and without those IF $is_single_entry blocks and see what happens. :)

Regards,
Garvin

is_signle_entry

Posted: Thu Sep 22, 2005 5:18 pm
by pierre
thx a lot
I see it!