Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#13 2013-09-07 21:51:31
- GugUser
- Member
- From: Quito (Ecuador)
- Registered: 2007-12-16
- Posts: 1,477
Re: I'm looking for a navigation menu with submenus!
Oh, now I realize that I had misunderstood you.
You want for each item in the main navigation your code snippet:
<txp:section wraptag=“li” link=‘1’ title=‘1’ name=“articles”>
<txp:category_list wraptag=“ul” break=“li” />
</txp:section>
The problem with this is that your subnav is inside the main link:
<li><a href="http://thaicares.com/about/" title="">
About
<ul class="category_list">
<li><a href="http://thaicares.com/category/art/">art</a></li>
<li><a href="http://thaicares.com/category/diy/">diy</a></li>
<li><a href="http://thaicares.com/category/me/">me</a></li>
<li><a href="http://thaicares.com/category/projects/">projects</a></li>
<li><a href="http://thaicares.com/category/relationships/">relationships</a></li>
<li><a href="http://thaicares.com/category/social/">social</a></li>
<li><a href="http://thaicares.com/category/web/">web</a></li>
</ul>
</a></li>
Everyone does it the way he pleases!
What is your problem with <txp:category_list />
?
The current issue’s I have with it as you can see above: the submenu’s have the extra blank link also they don’t fit in the border lines and the menu is floated left and I don’t know how to make it center…
All this has to do with your CSS, not with Textpattern.
Last edited by GugUser (2013-09-07 21:56:54)
Offline
Re: I'm looking for a navigation menu with submenus!
Tyler
Thank you for including the link to your site. It’s much easier for people to help you when you post the code you are working with, and include the site when possible for them to look at.
This is not an advanced area of expertise for me. I’ve usually have done more basic things.
Fwiw, You can create your navigation more than one way. However, that doesn’t mean that every way can work.
In the case of <txp:linklist />, I think you may misunderstand what the tag is designed to do based on what you have said. <txp:linklist /> is designed to only pull a list of links from the content tab “links”. These are links you have manually entered (full disclosure: there is a plugin that let’s you add links using js from your browser bar). In order for you you to use <txp:linklist /> you would need to create an entry for each of your internal links. Which is doing it the harder way :).
If you want to link to actual sections:
- With <txp:section_list /> you have two ways of controlling what sections show. The proactive allows you to add just the (named) sections you want included. The reactive way is to include all sections except those named. It sounds like you want the former method. Use the attribute sections=”“ (<txp:section_list sections=“example1, example2, example3” />)
- If you want to have a mix of external links and internal links, take a look at the TxpTips link I shared. Part way down the list there is an example.
- If you want categories, or a mix of sections and categories, again, TxpTips has examples.
Does this help?
Last edited by maverick (2013-09-07 22:20:13)
Offline
Re: I'm looking for a navigation menu with submenus!
Take a look at Txp Tip: Drop Down Menu
Remember – vertical drop downs vs. horizontal drop downs are primarily a matter of CSS.
As GugUser said, the display issues are not particular to Txp, but to your css.
Offline