Is there a way to display headlines only?
I have categories set up, and I would like the user to click a category link and see only the headlines come up, not the entire articles.
Thanks
Headlines
-
Guest
-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
The entries.tpl file can be found in templates/default/entries.tpl.
And yes, we moved quite a few files to the 'include' subdirectory tree - all those files no longer need to swamp the document root
Regards,
Garvin
And yes, we moved quite a few files to the 'include' subdirectory tree - all those files no longer need to swamp the document root
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/
# 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/
-
Guest
I found the entries.tpl file, but I have no idea how to edit it and don't know if that's what I'm really looking to do.
Here is my site:
http://www.cybermidi.com/default.php
I have the news on the front page as I want it. All I am looking for
are links to CATEGORIES to put on the left hand side of the screen.
I already have them there, but when they are clicked, they bring up
all the stories in the category. I just want them to bring up a page with just clickable headlines to each story. Can this be done?
thanks again.
Here is my site:
http://www.cybermidi.com/default.php
I have the news on the front page as I want it. All I am looking for
are links to CATEGORIES to put on the left hand side of the screen.
I already have them there, but when they are clicked, they bring up
all the stories in the category. I just want them to bring up a page with just clickable headlines to each story. Can this be done?
thanks again.
-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Yes, it can be done - but you need a bit knowledge of simple comparison logic and some basic HTML; some PHP would also help in the process of creating it.
Serendipity is prepared to let you edit all the HTML code and also introduce new logic to switch whether to display content or headlines or whatever; but you need to do some "if" clauses to show the parts of HTML that you need.
For instance you could edit your entries.tpl file like this. Old code:
New code:
Notice the first line which queries if you are in category view. NOTICE: For this to work you need to disable your Smarty Security mode! Edit the file include/functions_smarty.inc.php, search for
and change it to:
Since your page is commercial and your question rather specific to your installation, I cannot give you further free advice; if you need more help to set it up, just contact me and I am sure we can work something out. I'm interested in MIDI-files. 
Regards,
Garvin.
Serendipity is prepared to let you edit all the HTML code and also introduce new logic to switch whether to display content or headlines or whatever; but you need to do some "if" clauses to show the parts of HTML that you need.
For instance you could edit your entries.tpl file like this. Old code:
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}
{if $entry.has_extended and not $is_single_entry and not $entry.is_extended}
<br /><a href="{$entry.link}#extended">{$CONST.VIEW_EXTENDED_ENTRY|@sprintf:$entry.title}</a><br /><br />
{/if}
Code: Select all
{if (not $is_single_entry && !preg_match('@/categories@', $smarty.server.REQUEST_URI))}
<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}
{if $entry.has_extended and not $is_single_entry and not $entry.is_extended}
<br /><a href="{$entry.link}#extended">{$CONST.VIEW_EXTENDED_ENTRY|@sprintf:$entry.title}</a><br /><br />
{/if}
{/if}
Code: Select all
$serendipity['smarty']->security = true;
Code: Select all
$serendipity['smarty']->security = false;
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/
# 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/