Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
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
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
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>
</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
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>
<!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>
<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:article status="sticky" />
<!— or use:
<txp:article id="articleID#" />
—>
</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>
</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
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
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
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
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
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
Pages: 1