Theming questions

Skinning and designing Serendipity (CSS, HTML, Smarty)
Post Reply
user1234
Regular
Posts: 75
Joined: Tue Sep 22, 2009 9:49 pm

Theming questions

Post by user1234 »

Hi,

I've searched forum and files, and I know the answer must be somewhere, but somehow it eludes me...

I want to set up a (static) front page (no problem so far with that), which contains under the static page text links to the recentmost 5 or 10 blog entries (any, meaning from all categories sorted by date) and these entries should only be shown as linked titles with a date. I suppose this might be achieved with some sort of nugget or possibly with an own .tpl for that specific front page, but somehow I can't put this together. Any help from the coders here would be much appreciated.

Also, in the category views (all together and only of one category) I'd again only have the titles of the entries and the date shown. Again I look for the easiest and update-fast solution for this.

Cheers,

Dachs
user1234
Regular
Posts: 75
Joined: Tue Sep 22, 2009 9:49 pm

Re: Theming questions

Post by user1234 »

Hi again,

okay, I'm stupid (it *is* a Monday, though :mrgreen: ). I found out that the template staticpage with related category does just that if I choose "category none". Is that a bug or was this meant to work like that?

I'm still short of a solution as to how to get only titles and dates to display in overall category preview.

Cheers,

Dachs
yellowled
Regular
Posts: 7111
Joined: Fri Jan 13, 2006 11:46 am
Location: Eutin, Germany
Contact:

Re: Theming questions

Post by yellowled »

user1234 wrote:I'm still short of a solution as to how to get only titles and dates to display in overall category preview.
Category view is handled by entries.tpl, and there is a Smarty variable called $view available since s9y 1.0beta3 (http://s9y.org/102.html#A24). You should be able to suppress the stuff you don't need in category view with some statements like this:

Code: Select all

{if $view == 'categories'}
{* do nothing *}
{else}
...
{/if}
However, this is global, i.e. it applies to all categories. Also, notice that wide parts of the entries.tpl will only be display on single entry pages anyway, so you won't have to suppress them.

YL
Post Reply