Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2006-01-05 17:00:54

wmike1503
Member
Registered: 2006-01-03
Posts: 11

Links frustration

I am new to TextPattern – loving it. A little frustrated with links – surprise, surprise.

I would like to create a navigation listing that shows links under section and articles, for example:

Articles section business articles web design articles it articles

Downloads section business web design it articles

Etc…

I know how do do static pages – but, again not how to group them in any logical way.

I am sure that this is fairly simple – unfortunately the solution evades me.

Any ideas, anyone, please?

Thanks!

Mike

Offline

#2 2006-01-05 17:40:56

NXArmada
Member
From: Sevierville, TN
Registered: 2005-09-13
Posts: 82

Re: Links frustration

you can use this TXP:tag to make a navigation of sections:
TXP:section list

you can use this TXP:tag to make a navigation of articles
TXP:article custom

You can also use “if” tags to say if your in such section show these sublinks.

Textbook has some more documentation on how to do what your asking.


Ryan

Offline

#3 2006-01-05 19:21:05

wmike1503
Member
Registered: 2006-01-03
Posts: 11

Re: Links frustration

Thanks for that Ryan.

Still none the wiser- do I have to hand code this?

I’m trying to have a logical navbar in ‘side bar 1’ displaying headings – then the section links.

Cheers!

Mike

Offline

#4 2006-01-05 20:02:57

NXArmada
Member
From: Sevierville, TN
Registered: 2005-09-13
Posts: 82

Re: Links frustration

Can you elaborate give us a visual example on the forums like:

Home
  • Contact Us
  • Jobs
Products
  • Laptops
  • Computers

Last edited by NXArmada (2006-01-05 20:03:49)


Ryan

Offline

#5 2006-01-05 20:05:24

wmike1503
Member
Registered: 2006-01-03
Posts: 11

Re: Links frustration

I’ve gone for text headings – then categorised links inder each heading.

This seems to be the simplest way of doing things [guilty of over complicating things!]

Cheers!

Mike

Offline

#6 2006-01-05 20:16:06

wmike1503
Member
Registered: 2006-01-03
Posts: 11

Re: Links frustration

Hi Ryan,

Your last post is exactly what I’m aiming for.

Cheers!

Mike

Offline

#7 2006-01-05 21:10:28

NXArmada
Member
From: Sevierville, TN
Registered: 2005-09-13
Posts: 82

Re: Links frustration

you can try:
<code>
<txp:if_section name=“home”>
<txp:article_custom section=“home” />
<txp:else />
<a href=”/home”>Homes</a>
</txp:if_section>
</code>
That well display all the articles listed in section home.
<code>
<txp:if_section name=“home”>
<txp:article_custom section=“home” />
<txp:else />
<a href=”/home”>Home</a>
</txp:if_section>
<txp:if_section name=“products”>
<txp:article_custom section=“products” />
<txp:else />
<a href=”/products”>Products</a>
</txp:if_section>
</code>
This bit of code will display a link to Products and well show all the articles listed in the Home section, if your on the home page. If you move to products it well place a link to Home and Display articles in the Products section.

This is a short run down on how I do this on my site. I am still learning TXP myself.

Last edited by NXArmada (2006-01-05 21:11:12)


Ryan

Offline

#8 2006-01-05 21:55:48

nardo
Member
From: tuvalahiti
Registered: 2004-04-22
Posts: 743

Re: Links frustration

you could possibly use the txp:if_different tag … see the bottom of this faq entry

there are also some plugins – rdt_dynamenus is one

Offline

#9 2006-01-05 23:15:09

zem
Developer Emeritus
From: Melbourne, Australia
Registered: 2004-04-08
Posts: 2,579

Re: Links frustration

fwiw, navigation links are covered in the FAQ.


Alex

Offline

Board footer

Powered by FluxBB