Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
Question about article tags...
Sorry, I am new to this…
What I want to achieve is to have the title of the article display within the h1 tags.
In my default_article form I have:
<code>
<txp:body />
<txp:comments_invite wraptag=“p” />
</code>
In my default page I have the following code:
<code>
<!— body start —>
<div id=“content”>
<div id=“column-one”>
<h1>her goes the title</h1>
<div id=“column-padding”>
<txp:article />
<txp:if_individual_article>
<txp:link_to_prev><txp:prev_title /></txp:link_to_prev>
<txp:link_to_next><txp:next_title /></txp:link_to_next>
</txp:if_individual_article>
<txp:if_article_list>
<txp:older>Previous</txp:older>
<txp:newer>Next</txp:newer>
</txp:if_article_list>
</div>
</div>
</code>
Does anybody have a suggestion?
Also, it would be great if someone could explain to me how it exactly works with these article tags?
Don’t quite understand the concept yet.
Thanks guys!
Offline
Re: Question about article tags...
Your article title should go into the default form template.
If this page is going to show more than one article you should use something lower than an h1 like an h2. h1 tags should only really appear on a page once and are the top-level title tag so they are normally used for your site title which is the most important piece of information on the page
The article tag is where your article/s will appear in your page and is also used to control how many are listed on a page and what form template is used to display them.
Stuart
In a Time of Universal Deceit
Telling the Truth is Revolutionary.
Offline
Re: Question about article tags...
Thanks Stuart for the tip with the h1 tag, but I still don’t quite understand how an article is linked or referred to from the default page?
I have pasted the code into the default_article form just how you suggested and it worked.
But how is the default_article form called or referenced in the default page? I still don’t understand the concept. I looked in textbook, but never seem to find what I am looking for.
Thanks!
Dada
Last edited by dada78 (2005-12-08 05:17:20)
Offline
#4 2005-12-08 06:15:15
- zem
- Developer Emeritus
- From: Melbourne, Australia
- Registered: 2004-04-08
- Posts: 2,579
Offline
Re: Question about article tags...
The article tag will automatically use the default form template unless you use the “form” attribute to tell it to use something else so – <code><txp:article form=“formName” /></code>.
Apart from the FAQ that zem mentions you should click on the “Manual” link at the top of the page and “bookmark” it. You will find a Tag Index there. If you select a specific tag it will show you how it is used and where it can be used as well as all the “attributes” you can use with the tag. Very handy.
Last edited by thebombsite (2005-12-08 10:38:12)
Stuart
In a Time of Universal Deceit
Telling the Truth is Revolutionary.
Offline
Pages: 1