Page 1 of 1
Category problem
Posted: Wed Jul 11, 2007 11:01 pm
by Night-Walker
Hi I've two problems with my Blog (
www.andisheha.info ), i hope you can help me.
1. if you click at a category (First at the sidebar) it should show the articles from the Category but it shows only "STATIC PAGE"
2. at the firstpage it should show the first 5 artilces from each category.
It's solved with Newsboxs. The header (that thing with the green background) should link to category but i don't know what should i add in the newsbox.tpl
the Code is this:
Code: Select all
<div class="newsbox"><center><h3 class="newsbox_title"><a href="#">{$newsbox_data.title}</a></h3></center>
Thanks

Re: Category problem
Posted: Thu Jul 12, 2007 10:42 am
by garvinhicking
Hi!
1. if you click at a category (First at the sidebar) it should show the articles from the Category but it shows only "STATIC PAGE"
You seem to have created some file where this "Staticpage!!!" is inserted, it does not come from serendipity itself. Where did you create this, do you remember?
It might also be a problem of your permalinks. You changed those from the default to something else, how does your permalink config look like?
2. at the firstpage it should show the first 5 artilces from each category.
It's solved with Newsboxs. The header (that thing with the green background) should link to category but i don't know what should i add in the newsbox.tpl
the Code is this:
Code: Select all
<div class="newsbox"><center><h3 class="newsbox_title"><a href="#">{$newsbox_data.title}</a></h3></center>
Try:
Code: Select all
<div class="newsbox"><center><h3 class="newsbox_title"><a href="/categories/{$newsbox_data.cats}">{$newsbox_data.title}</a></h3></center>
?
Regards,
Garvin
Posted: Mon Jul 23, 2007 1:16 am
by Night-Walker
Thanks for your Help
You seem to have created some file where this "Staticpage!!!" is inserted, it does not come from serendipity itself. Where did you create this, do you remember?
You are right! I've changed the entries.tpl to hide the entries at the first page.
With this code:
Code: Select all
{if $entry.is_extended}
<h2 class="serendipity_commentsTitle"><a href="{$entry.link}">{$entry.title|@default:$entry.body|truncate:200}</a></h2>
{elseif $staticpage_pagetitle != 'firstpage'}
Staticpage!!!
{else}
<h2 class="serendipity_commentsTitle_frontpage"><a href="{$entry.link}" >{$entry.title|@default:$entry.body|truncate:200:" ..."}</a></h2>
{/if}
But with this the Categories and the Archive doesn't work

Is there anyway to solve it?
It might also be a problem of your permalinks. You changed those from the default to something else, how does your permalink config look like?
I'm using this tags for the Permalinks
Code: Select all
Entry URL: archives/%id%-%day%-%month%-%year%.html
Categories: categories/%id%
Because s9y can't parse the UTF8 code and add a "unknown" instead of %title% or %name%
Try:
Code:
<div class="newsbox"><center><h3 class="newsbox_title"><a href="/categories/{$newsbox_data.cats}">{$newsbox_data.title}</a></h3></center>
Now it shows "Array"

Posted: Mon Jul 23, 2007 3:31 pm
by garvinhicking
Hi!
You are right! I've changed the entries.tpl to hide the entries at the first page.
With this code:
What did you want to achieve with this code? The code should never reach this portion of entries.tpl when a staticpage is displayed - entries.tpl is not fully evaluated when a static page is displayed...
I'm using this tags for the Permalinks
Code: Select all
Entry URL: archives/%id%-%day%-%month%-%year%.html
Categories: categories/%id%
Because s9y can't parse the UTF8 code and add a "unknown" instead of %title% or %name%
Could you try to use %id%/%day%/%month% or so instead? Using path seperators instead of "-". Because it might be that this "-" is causing some other strange lookup pattern.
s9y can parse UTF8 code, but UTF8 is not allowed in HTML, so it needs to replace all UTF8 codes to native ISO88591 ones. Some languages, like russian, support a global array that instructs s9y how to replace variables ($i18n_from and $i18n_to)
Now it shows "Array"

Maybe $newsbox_data.cats.0? Don't know which format the variable is in, I myself sadly don't know much about the newsbox plugin.
Regards,
Garvin
Posted: Thu Aug 02, 2007 4:34 pm
by Night-Walker
Thanks with $newsbox_data.cats.0 it works.
I've now editet the template files and have restorethe entries.tpl
But I#ve now deleted this foreachelse loop
Code: Select all
{foreachelse}
{if not $plugin_clean_page}
<h2 class="serendipity_date">{$CONST.SORRY}</h2>
<div class="serendipity_overview_noentries">{$CONST.NO_ENTRIES_TO_PRINT}</div>
{/if}
Because it always shows a Error at the firstpage. I hope that i didn't destroy too much
Now it shows the Navigations Links at the firstpage
Code: Select all
« previous page (Page 1 of 1, totaling 0 entries) next page »
But I've deacticed it at the Staticpages.
Is there ay way to force that it should not shown?
Thanks

Posted: Thu Aug 09, 2007 2:40 pm
by garvinhicking
Hi!
Hm, I believe this is a specific problem caused by the staticpage being shown as the startpage. I think when you call the staticpage by its permalink, the navigation will nto show up, right?
Another reason might be the parsing of the newsbox plugin, because that one enables the display of pagination elements...
This might be quite tricky. I figure the easiest way would be to patch up your entries.tpl file and insert
Code: Select all
{if $staticpage_pagetitle != 'pagetitle_of_startpage'}
.... the pagination div-stuff here ...
{/if}
Replace 'pagetitle_of_startpage' with the real pagetitle of your static startpage. This will then not show the pagination when that page is being displayed.
Regards,
Garvin
Posted: Thu Aug 09, 2007 3:22 pm
by Night-Walker
argh now it doesn't show the Navigation at the Bottom but it shows a Link to the article of the last Newsbox
may it helps if you see my
Entries.tpl and
Newsbox.tpl
Posted: Thu Aug 09, 2007 4:27 pm
by garvinhicking
Hi!
And this link wasn't there before? Try to move the
Code: Select all
{if $staticpage_pagetitle != 'home'}
after the entries_footer hook.
Regards,
Garvin