Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2006-09-14 03:20:36

raspberryheaven
Member
From: Washington state USA
Registered: 2006-05-21
Posts: 52
Website

Catagories/sections issue?

I ‘m not sure what the issue is. I’m trying to create a contact page on my website http://www.runjeeta.com. I got a catagory made and a section made for that catagory which you can see on the right hand nav section (contact) but, I cannot get my article( a sticky) for this page to show up! I know the sticky thing works now on my site using this template becuase I made the front page a sticky. So…I’m not sure what i’m doing wrong. I made an article, gave it the page template i wanted, made a section and a catagory called contact, which I labled the article with and…nothing…. What am I missing?


“Words have no wings but they can fly a thousand miles.” (Korean Proverb)

Offline

#2 2006-09-14 03:40:09

jm
Plugin Author
From: Missoula, MT
Registered: 2005-11-27
Posts: 1,746
Website

Re: Catagories/sections issue?

The contact “area” should be a section. In your page template for the contact section, do you have <txp:article status="sticky" /> or <txp:article id="contactid#" />? There’s an entry in the FAQ on stickies.

Could you post your code for your contact page template and form? Also, this FAQ entry might help.

Offline

#3 2006-09-14 04:05:38

raspberryheaven
Member
From: Washington state USA
Registered: 2006-05-21
Posts: 52
Website

Re: Catagories/sections issue?

I converted the default into a sticky and re saved the default into a different page.
code looks like this (which i would attach into a text file if I could figure out how):

I got the code on how to do the sticky for my front page on this post: http://forum.textpattern.com/viewtopic.php?pid=112322#p112322
why wouldn’t it work for everything?

<code>
<!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=“stylesheet” href=”<txp:css />” type=“text/css” media=“screen” />
</head>
<body>

<div id=“page”> <div id=“top”></div>

<div id=“wrapper”> <div id=“header”> <h1> <txp:link_to_home class=“site_name”><txp:sitename /></txp:link_to_home> </h1> </div> <div id=“content”> <txp:if_category>

<!— we’re looking at a category list —> <txp:article limit=“5” form=“default” />

<txp:else />

<txp:if_search>

<!— nope, we’re looking at a search results list —> <txp:article limit=“5” form=“search_results” />

<txp:else />

<!— neither, we’re looking at the front page —> <txp:article section=“the-section-your-sticky-is-in” status=“sticky” limit=“5” form=“sticky” />

</txp:if_search>
</txp:if_category>

<txp:if_individual_article> <div class=“navigation”> <div class=“alignleft”> <txp:link_to_prev>&laquo; <txp:prev_title /></txp:link_to_prev> </div> <div class=“alignright”> <txp:link_to_next><txp:next_title /> &raquo;</txp:link_to_next> </div> </div> </txp:if_individual_article> <txp:if_article_list> <div class=“navigation”> <div class=“alignleft”> <txp:older>&laquo; Previous</txp:older> </div> <div class=“alignright”> <txp:newer>Next &raquo;</txp:newer> </div> </div> </txp:if_article_list> </div><!— content —> </div><!— wrapper —> <div id=“sidebar”> <div id=“noindent”> <ul> <li> <form action=”<txp:site_url />” method=“get”> <h2>Search</h2> <input type=“text” name=“q” value=”“ id=“s” size=“15” /> </form> </li> <li> <h2>Categories</h2> <txp:category_list break=“br” /> </li> <li> <h2>Links</h2> <txp:linklist form=“plainlinks” sort=“date desc” break=“br” /> </li> </ul> </div><!— noindent —> </div><!— sidebar —> <div id=“footer”> <p> Proudly powered by <a href=“http://www.textpattern.com”>Textpattern</a> | <txp:feed_link label=“RSS” section=“article” flavor=“rss” /> </p> </div> </div><!— page —>

</body>
</html>
</code>

Last edited by raspberryheaven (2006-09-14 04:09:11)


“Words have no wings but they can fly a thousand miles.” (Korean Proverb)

Offline

#4 2006-09-14 05:34:28

jm
Plugin Author
From: Missoula, MT
Registered: 2005-11-27
Posts: 1,746
Website

Re: Catagories/sections issue?

Oh OK. Just copy that page template as contact and set the contact section to use the contact page.

Here’s what it’d look like:

page: contact

<pre>
&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot; &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;&gt;
&lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot; xml:lang=&quot;en&quot; lang=&quot;en&quot;&gt;
&lt;head&gt; &lt;title&gt;&lt;txp:page_title /&gt;&lt;/title&gt; &lt;link rel=&quot;stylesheet&quot; href=&quot;&lt;txp:css /&gt;&quot; type=&quot;text/css&quot; media=&quot;screen&quot; /&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;div id=&quot;page&quot;&gt; &lt;div id=&quot;top&quot;&gt;&lt;/div&gt; &lt;div id=&quot;wrapper&quot;&gt; &lt;div id=&quot;header&quot;&gt; &lt;h1&gt;&lt;txp:link_to_home class=&quot;site_name&quot;&gt;&lt;txp:sitename /&gt;&lt;/txp:link_to_home&gt;&lt;/h1&gt; &lt;/div&gt; &lt;div id=&quot;content&quot;&gt; &lt;txp:article status=&quot;sticky&quot; /&gt; &lt;!— or use: &lt;txp:article id=&quot;articleID#&quot; /&gt; —&gt; &lt;/div&gt;&lt;!— content —&gt; &lt;/div&gt;&lt;!— wrapper —&gt; &lt;div id=&quot;sidebar&quot;&gt; &lt;div id=&quot;noindent&quot;&gt; &lt;ul&gt; &lt;li&gt; &lt;form action=&quot;&lt;txp:site_url /&gt;&quot; method=&quot;get&quot;&gt; &lt;h2&gt;Search&lt;/h2&gt; &lt;input type=&quot;text&quot; name=&quot;q&quot; value=&quot;&quot; id=&quot;s&quot; size=&quot;15&quot; /&gt; &lt;/form&gt; &lt;/li&gt; &lt;li&gt; &lt;h2&gt;Categories&lt;/h2&gt; &lt;txp:category_list break=&quot;br&quot; /&gt; &lt;/li&gt; &lt;li&gt; &lt;h2&gt;Links&lt;/h2&gt; &lt;txp:linklist form=&quot;plainlinks&quot; sort=&quot;date desc&quot; break=&quot;br&quot; /&gt; &lt;/li&gt; &lt;/ul&gt; &lt;/div&gt;&lt;!— noindent —&gt; &lt;/div&gt;&lt;!— sidebar —&gt; &lt;div id=&quot;footer&quot;&gt; &lt;p&gt; Proudly powered by &lt;a href=&quot;http://www.textpattern.com&quot;&gt;Textpattern&lt;/a&gt; | &lt;txp:feed_link label=&quot;RSS&quot; section=&quot;article&quot; flavor=&quot;rss&quot; /&gt; &lt;/p&gt; &lt;/div&gt;
&lt;/div&gt;&lt;!— page —&gt;
&lt;/body&gt;
&lt;/html&gt;
</pre>

Actually, since you’re creating a separate section for contact, you don’t really need a sticky. You could just use a vanilla txp:article . But see if the above works first :). Also, indenting TXP code in a text editor helps quite a bit when learning conditionals and working with templates.

Last edited by deldindesign (2006-09-14 05:35:23)

Offline

#5 2006-09-14 05:43:59

raspberryheaven
Member
From: Washington state USA
Registered: 2006-05-21
Posts: 52
Website

Re: Catagories/sections issue?

ok. thanks! I’ll try that out and get back.


“Words have no wings but they can fly a thousand miles.” (Korean Proverb)

Offline

#6 2006-09-14 05:52:12

raspberryheaven
Member
From: Washington state USA
Registered: 2006-05-21
Posts: 52
Website

Re: Catagories/sections issue?

hmmm……Nothing happened. I re-set the section contact, to the page template contact..and it’s still a blank page.. I’m going to have to play around a bit.


“Words have no wings but they can fly a thousand miles.” (Korean Proverb)

Offline

#7 2006-09-14 06:04:13

jm
Plugin Author
From: Missoula, MT
Registered: 2005-11-27
Posts: 1,746
Website

Re: Catagories/sections issue?

Try setting the contact article to live and not sticky. Then change <txp:article status="sticky" /> to <txp:article />.

EDIT: Appears you got it working.

Last edited by deldindesign (2006-09-14 06:05:52)

Offline

#8 2006-09-14 06:11:17

raspberryheaven
Member
From: Washington state USA
Registered: 2006-05-21
Posts: 52
Website

Re: Catagories/sections issue?

OH no! now I kind of see what is going on. what you got to work was
http://www.runjeeta.com/contact/
when I click on the catagory title “Contact” on the right side of the page, I get:
http://www.runjeeta.com/category/contact/.
It appears that I’m not understanding what catagories are for. I’ll do some more homework on this.
Although, how did you find http://www.runjeeta.com/contact?

Becky


“Words have no wings but they can fly a thousand miles.” (Korean Proverb)

Offline

#9 2006-09-14 06:45:19

raspberryheaven
Member
From: Washington state USA
Registered: 2006-05-21
Posts: 52
Website

Re: Catagories/sections issue?

ok! Score. I figured out what was going on. So now in the Links part of my side bar I have “contact” with the correct page. Nice. I guess this is a little more intuative than I thought it was.


“Words have no wings but they can fly a thousand miles.” (Korean Proverb)

Offline

Board footer

Powered by FluxBB