Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2024-01-05 11:20:22

Gallex
Member
Registered: 2006-10-08
Posts: 1,304

frontpage news error

i use this code to display news in frontpage

<txp:article_custom section="uudised" limit="5" sort="Posted desc" wraptag="ul" break="li" class="block-uudised">
<h2><txp:permlink><txp:title /></txp:permlink></h2>
<span class="posted"><txp:posted format="%d.%m.%Y" />
 | Kat: <txp:category_list categories='<txp:category1 />, <txp:category2 />' break=", " trim>
     <txp:category title link />
</txp:category_list> 
</span>
</txp:article_custom>

if i click on a category link “AASTA LIND”, it opens this page:
https://eoy.ee/kagu/category/aasta-lind/ with error:

Tag error:  ->  Textpattern Notice: Page template default does not contain a txp:article tag. while parsing form None on page default
textpattern/publish.php:748 trigger_error()
index.php:74 textpattern()

but it should open this page:
https://eoy.ee/kagu/uudised/aasta-lind/

but, if i use this code:

<txp:article_custom section="uudised" limit="3" sort="Posted desc" wraptag="ul" break="li" class="block-uudised">
<h2><txp:permlink><txp:title /></txp:permlink></h2>
<span class="posted"><txp:posted format="%d.%m.%Y" /> | Kat: <txp:category1 section='<txp:section />' title="1" link="1" /></span>
</txp:article_custom>

all works well, no txp:article tag error. so, i assume the error should be here, in category list tag:

| Kat: <txp:category_list categories='<txp:category1 />, <txp:category2 />' break=", " trim>
     <txp:category title link />
</txp:category_list>

Offline

#2 2024-01-05 17:30:36

bici
Member
From: vancouver
Registered: 2004-02-24
Posts: 2,086
Website Mastodon

Re: frontpage news error

hmm. I clicked on all three of the “AASTA LIND” links on the homepage that appear along the left hand side under the bird logo:

for example clicking on this link works fine:
02.01.2024 | KAT: AASTA LIND

I was not able to find anything on your page that caused the error. Perhaps I ma missing something.

PS lovely site!


…. texted postive

Offline

#3 2024-01-05 19:02:36

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 4,702
Website

Re: frontpage news error

What happens if you add the section attribute to the txp:category tag like you have in category1 and category2?

<txp:category section='<txp:section />' title link />

TXP Builders – finely-crafted code, design and txp

Offline

#4 2024-01-07 06:29:37

Gallex
Member
Registered: 2006-10-08
Posts: 1,304

Re: frontpage news error

jakob wrote #336295:

What happens if you add the section attribute to the txp:category tag like you have in category1 and category2?

<txp:category section='<txp:section />' title link />...

Bingo! Thank you!

Offline

#5 2024-01-07 06:33:34

Gallex
Member
Registered: 2006-10-08
Posts: 1,304

Re: frontpage news error

bici wrote #336294:

hmm. I clicked on all three of the “AASTA LIND” links on the homepage that appear along the left hand side under the bird logo:

for example clicking on this link works fine:
02.01.2024 | KAT: AASTA LIND

PS lovely site!

I put the second code temporarily back, that is why it worked

Offline

Board footer

Powered by FluxBB