Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2008-12-13 13:16:24

mcx
Member
Registered: 2008-11-11
Posts: 12

Problem commenting sticky article.

Warning – potentially noob question…

I seem to be having a problem with the comment function. An article that with a “Sticky” status turns up a content-less (head info. and sidebar intact) page when the articles “comment” link calls that function. The problem disappears if the article status is changed to “Live” however for the time being I would like the article to appear at the top of the list.

Am I missing something quite obvious like “you cannot comment on sticky articles” or did I break something? Any pointers would be much appreciated.

Thanks in advance!

Offline

#2 2008-12-13 13:33:01

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: Problem commenting sticky article.

The <txp:article /> tag that takes care of displaying article lists as well as the individual articles will only display live articles unless status="sticky" is used. So to display your sticky article as an individual article you need to add something like

<txp:if_individual_article>
<txp:article status="sticky" />
</txp:if_individual_article>

on your page.

Offline

#3 2008-12-13 14:50:58

mcx
Member
Registered: 2008-11-11
Posts: 12

Re: Problem commenting sticky article.

Thank you for the quick reply Els!

Even though I now get the gist of what was happening I am having difficulty find the correct place to make the adjustment.

I tried placing the additional line in-between the if_individual_article tags on the default page but that did not seem to make a difference even after I emptied the cache and refreshed the browser.

Should I be inserting into a different page/form?

Thanks again!

Offline

#4 2008-12-13 18:55:13

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: Problem commenting sticky article.

Do you use the default page for all your sections (using if_section tags), or do you have another page template for the section your sticky article is in? Can you post the code that is on the page that is used for this section?

Offline

#5 2008-12-15 03:37:16

mcx
Member
Registered: 2008-11-11
Posts: 12

Re: Problem commenting sticky article.

Thank you Els,

Here is the code from the default page. Sorry this is my first time posting code on the forum and I do not know how to make the first two lines disappear.

<txp:permlink><txp:title /></txp:permlink>
<p><txp:posted /></p>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

	<title><txp:page_title /></title>

	<link rel="home" href="<txp:site_url />" />

	<txp:feed_link flavor="atom" format="link" label="Atom" />
	<txp:feed_link flavor="rss" format="link" label="RSS" />

	<txp:css format="link" />

        <script type="text/javascript" src="/js/mootools.js"></script>
        <script type="text/javascript" src="/js/slimbox.js"></script>
        <link rel="stylesheet" type="text/css" href="/css/slimbox.css" />

</head>
<body id="<txp:if_section name="default">front<txp:else /><txp:section /></txp:if_section>">

<!-- accessibility -->
<div id="accessibility">
	<ul>
		<li><a href="#content"><txp:text item="go_content" /></a></li>
		<li><a href="#sidebar-1"><txp:text item="go_nav" /></a></li>
		<li><a href="#sidebar-2"><txp:text item="go_search" /></a></li>
	</ul>
</div>

<div id="container">

<!-- head -->
	<div id="head">
		<h1 id="site-name"><txp:link_to_home><txp:site_name /></txp:link_to_home></h1>
		<p id="site-slogan"><txp:site_slogan /></p>
	</div>

<!-- left -->
	<div id="sidebar-1">
                <txp:mdp_calendar_small section="articles" class="calendar"/>
                <p>

                <txp:linklist category="post" />

		<txp:section_list wraptag="ul" break="li" />

		<txp:search_input wraptag="p" />

		<p><txp:feed_link label="RSS" /> / <txp:feed_link flavor="atom" label="Atom" />
                <p><txp:linklist category="db"  class="db" />

         </div> 

<!-- center -->

	<div id="content">

<txp:article status="sticky" limit=1 />

<txp:if_category>

		<h2><txp:category title="1" /></h2>

		<div class="hfeed">
		<txp:article form="article_listing" limit="5" />
		</div>
<txp:else />
	<txp:if_search>
		<h2><txp:text item="search_results" />: <txp:page_url type="q" /></h2>

		<div class="divider"><img src="<txp:site_url />images/1.gif" width="400" height="1" alt="---" title="" /></div>
	</txp:if_search>

		<div class="hfeed">
		<txp:article limit="5" />
		</div>
</txp:if_category>

<txp:if_individual_article>
                <txp:article status="sticky" />
		<div class="divider"><img src="<txp:site_url />images/1.gif" width="400" height="1" alt="---" title="" /></div>

		<p><txp:link_to_prev>« <txp:prev_title /></txp:link_to_prev> 
			<txp:link_to_next><txp:next_title /> »</txp:link_to_next></p>
<txp:else />

<txp:rsx_page_number_list nav='1' older='[Older &gt;&gt;]' newer='[&lt;&lt; Newer]' delim='' windowsize='5' />

</txp:if_individual_article>
	</div>

<!-- footer -->
	<div id="foot">&nbsp;</div>

</div>

</body>
</html>

Last edited by mcx (2008-12-15 03:39:00)

Offline

#6 2008-12-15 19:51:46

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: Problem commenting sticky article.

I don’t see anything that could prevent your article to show up… Are you sure this is the page that is used by the section this article is in? (In other words: is this the page assigned to the section in Presentation > Sections?)
Could you post the tag trace of the page that is supposed to show the individual article? (Tag trace: see bottom of this FAQ).

Offline

Board footer

Powered by FluxBB