modifying the output format of an archive

Discussion corner for Developers of Serendipity.
Post Reply
pierre
Regular
Posts: 11
Joined: Thu Sep 22, 2005 2:10 am
Location: France
Contact:

modifying the output format of an archive

Post by pierre »

I want to modify the output of the page archive - the {$entry.link} var in entries.tpl .

How do I do that ?
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: modifying the output format of an archive

Post 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
# 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/
pierre
Regular
Posts: 11
Joined: Thu Sep 22, 2005 2:10 am
Location: France
Contact:

Link {$entry.link}

Post 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.
Thx for your job
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Link {$entry.link}

Post 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
# 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/
pierre
Regular
Posts: 11
Joined: Thu Sep 22, 2005 2:10 am
Location: France
Contact:

Modifying the page of en entry

Post by pierre »

I want to just modify just the printing of the entry not the template of the first page.
Thx for your job
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Modifying the page of en entry

Post 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
# 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/
pierre
Regular
Posts: 11
Joined: Thu Sep 22, 2005 2:10 am
Location: France
Contact:

html

Post by pierre »

So for now its like this:
actual

and I would:
that
Thx for your job
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: html

Post 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
# 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/
pierre
Regular
Posts: 11
Joined: Thu Sep 22, 2005 2:10 am
Location: France
Contact:

extended

Post 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
Thx for your job
pierre
Regular
Posts: 11
Joined: Thu Sep 22, 2005 2:10 am
Location: France
Contact:

precision

Post 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

... ?
Thx for your job
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: precision

Post 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
# 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/
pierre
Regular
Posts: 11
Joined: Thu Sep 22, 2005 2:10 am
Location: France
Contact:

is_signle_entry

Post by pierre »

thx a lot
I see it!
Thx for your job
Post Reply