Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2008-11-19 18:12:15

roelof
Member
Registered: 2005-03-27
Posts: 647

why i don't see the articles (4.0.7)

Hello,

I have this page template :

<txp:if_section name=",default">
<txp:if_category name="zwangerschap,jaar1,jaar2,jaar3,jaar4">
<txp:smd_if field="urlvar:month, urlvar:pg" operator="eq,undefined" value="2005-04">
    <txp:article limit="1" form="dagboek" sort="Posted asc" />
    <txp:ob1_pagination outputlastfirst ="0" outputnextprevious="0" />
<txp:else />
    <txp:smd_if field="urlvar:month, urlvar:pg" operator="eq,eq" value="2005-04, 1">
       <txp:article limit="1" form="dagboek" sort="Posted asc" />
       <txp:ob1_pagination outputlastfirst ="0" outputnextprevious="0" />
       <txp:else />
      <txp:smd_if field="urlvar:month" operator="eq" value="2005-04">
      <txp:article limit="2" form="dagboek" offset="-1" sort="Posted asc" />
      <txp:ob1_pagination outputlastfirst ="0" outputnextprevious="0" />
</txp:smd_if>
</txp:smd_if>
</txp:smd_if>
<txp:else />
<txp:article_custom section="voorpagina" form="default" />
</txp:if_category>
</txp:if_section>
</div>

But if i go to 2005-04 i don’t see any articles.

Here’s a tag trace where you can see that the right article is being used.

<txp:if_section name=",default">
	[<txp:if_section name=",default">: true]
	<txp:if_category name="zwangerschap,jaar1,jaar2,jaar3,jaar4">
		[<txp:if_category name="zwangerschap,jaar1,jaar2,jaar3,jaar4">: true]
		<txp:smd_if field="urlvar:month, urlvar:pg" operator="eq,undefined" value="2005-04">
			[<txp:smd_if field="urlvar:month, urlvar:pg" operator="eq,undefined" value="2005-04">: true]
			<txp:article limit="1" form="dagboek" sort="Posted asc" />				
                                                               [SQL (0,145393133163): select name from txp_section where on_frontpage != '1']
				[SQL (0,00878596305847): select count(*) from textpattern where 1=1 and Status = 4 and Posted <= now() and (now() <= Expires or Expires = 0) and (Category1 IN ('zwangerschap') or Category2 IN ('zwangerschap')) and Posted like '2005-04%' and Section != 'articles' and Section != 'about' and Section != 'contact' and Section != 'gallery' and Section != 'voorpagina']
				[SQL (0,00431895256042): select *, unix_timestamp(Posted) as uPosted, unix_timestamp(Expires) as uExpires, unix_timestamp(LastMod) as uLastMod from textpattern where 1=1 and Status = 4 and Posted <= now() and (now() <= Expires or Expires = 0) and (Category1 IN ('zwangerschap') or Category2 IN ('zwangerschap')) and Posted like '2005-04%' and Section != 'articles' and Section != 'about' and Section != 'contact' and Section != 'gallery' and Section != 'voorpagina' order by Posted asc limit 1, 1]
			<txp:ob1_pagination outputlastfirst ="0" outputnextprevious="0" />
		</txp:smd_if>
	</txp:if_category>
</txp:if_section>

Anyone any idea’s ?

Roelof

Edit 1:

If section != articles means that the article must not be in the articles section. Then that’s the problem.
All the article except the frontpage are in the section article.

Edit 2 :

Wierd, if i set articles to the frontpage i see all the articles.
But articles are not the frontpage that’s the section “voorpagina”.

Last edited by roelof (2008-11-19 19:51:31)

Offline

#2 2008-11-20 08:47:44

roelof
Member
Registered: 2005-03-27
Posts: 647

Re: why i don't see the articles (4.0.7)

Hoi,

i have changed something and no i don’t see anything.
After the <div id=“content”> txp stops working.

My page template :

<div id="content">
<txp:if_section name=",default">
<txp:if_category name="zwangerschap,jaar1,jaar2,jaar3,jaar4">
<txp:smd_if field="urlvar:month" operator="eq" value="2005-04">
       <txp:smd_if field="urlvar:pg" operator="ge" value="2">
              <txp:article limit="2" form="dagboek" sort="Posted asc" />
              <txp:ob1_pagination outputlastfirst ="0" outputnextprevious="0" />
          <txp:else />
            <txp:article limit="1" form="dagboek" sort="Posted asc" />
            <txp:ob1_pagination outputlastfirst ="0" outputnextprevious="0" maximumtabs="4"/>
        </txp:smd_if>
<txp:else />
     <txp:smd_if field="urlvar:month" operator="defined">
         <txp:article limit="5" form="dagboek" sort="Posted asc" />
     </smd_if>
</smd_if>
<txp:else />
<txp:article_custom section="voorpagina" form="default" />
</txp:if_category>
</txp:if_section>
</div>

Does anyone see why this happen ?

Roelof

Offline

#3 2008-11-20 09:00:47

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,091
Website GitHub Mastodon Twitter

Re: why i don't see the articles (4.0.7)

Hi Roelof,

This looks like there might be a problem with your use of smd_if. Maybe asking in that thread will provide you with an answer.


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

Board footer

Powered by FluxBB