Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
#1 2006-02-10 06:52:17
- neomatrix
- Member
- From: Sofia, Bulgaria
- Registered: 2005-08-21
- Posts: 23
First timer questions
Hi, I’m building my first web site (temp. on www.mpetrov.info/barbara2) with textpattern and I just started learning the program. I will use this topic for asking you varous questions…
My first problem:
I want to display a single random quote on the home page. All quotes are stored as separate articles in a section called “testimonials”. I managed to display my single quote with this:
<code><txp:article_custom section=“testimonials” form=“testimonials” limit=“1” sortby=“rand()” /></code>
How can I exclude certain articles (quotes) from the testimonial section? Can I for exapmle create a category “not-good” which will be used for labeling quotes I don’t want to appear on the home page?
Offline
Re: First timer questions
add make both “testimonials” and “not-good” categories, not sections then call them by category with article_custom as you have been doing.
- categories are for content
- sections are presentation, for broad funtions (divisions of your site)
Offline
#3 2006-02-10 07:26:13
- neomatrix
- Member
- From: Sofia, Bulgaria
- Registered: 2005-08-21
- Posts: 23
Re: First timer questions
But I will have e section (with its own page) called “tesmtimonials” which will display all testimonials.
As long as I understand cateogies are for filtering or labeling (tagging).
P.S. If I have a section “about” and I create a subpage under about for all the testimonials, should I make that page a section too?
I’m still confused…
Last edited by neomatrix (2006-02-10 07:30:37)
Offline
Re: First timer questions
you could create 2 categories, “good” and “bad” and sort your testimonials that way. then you use the <code><txp:article_custom section=“testimonials” category=“good” /></code> to display only the good ones. do you know about the Tag listing? it’s a very good resource for looking up. look at the parameters of the tag.
Diagnosis:
Version Textpattern: 4.0.3 (r1188)
PHP-Version: 4.4.1
Hosting: all-inkl.com
Offline
#5 2006-02-10 22:15:40
- neomatrix
- Member
- From: Sofia, Bulgaria
- Registered: 2005-08-21
- Posts: 23
Re: First timer questions
Thanks, that was easy….
Another question:
How can I remove the class=“whatever” created by “txp:comments_invite” ?
Offline
#6 2006-02-11 03:32:21
- neomatrix
- Member
- From: Sofia, Bulgaria
- Registered: 2005-08-21
- Posts: 23
Re: First timer questions
And I want to ask another question.
Is it possible to put classes or id inside txp tags? I guess my question has been asked before but I’m having difficulties with the forum’s search engine (maybe I don’t use the right keywords).
Offline
Re: First timer questions
When it comes to markup, <a href=“http://textpattern.net/wiki/index.php?title=Alphabetical_Tag_Listing”>TextBook’s alphabetical tag listing</a> is far more thorough than the forum search. It will tell you <a href=“http://textpattern.net/wiki/index.php?title=Attributes_Cross_Reference#class”>which tags support the class attribute</a>.
Offline
Pages: 1