Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2007-04-11 19:58:02

Jmz
New Member
Registered: 2007-04-11
Posts: 7

Textpattern Navigation

I’m pretty new to Textpattern (only downloaded it yesterday) although I code websites in xHTML / CSS for a living so I’m pretty good at that. I decided to use textpattern to power my portfolio website because of its simplicity, power and flexibility. You can see what I’ve got so far here: http://jamesowers.co.uk Basically what I’m wondering is, what would be the best way to do the left navigation on there? At the moment its just hard coded onto the page, I’m not asking anybody to do it all for me, I just need an idea on what’s the best way to do it using textpattern.

Offline

#2 2007-04-11 20:47:34

mrdale
Member
From: Walla Walla
Registered: 2004-11-19
Posts: 2,215
Website

Re: Textpattern Navigation

  1. Use one of the section listing plugins that will give you a class or id per section to produce an unordered list.
  2. Make a single image that contains all of your icons
  3. Use it as a background image to your a-tag with css
  4. in css use the classes outut in #1 to feed specific links, specific image coordinates.
  5. Bob, is in fact, your mother’s brother.

Offline

#3 2007-04-12 06:50:54

Jmz
New Member
Registered: 2007-04-11
Posts: 7

Re: Textpattern Navigation

Thanks. What’s the best section listing plugin to use?

Offline

#4 2007-04-12 10:01:16

hilary
Member
Registered: 2006-09-11
Posts: 37

Re: Textpattern Navigation

Just insert this code
<txp:section_list wraptag=“ul” break=“li” />
Whereever you want your navigation to appear, and if you need more control over the ordering of the nav buttons, then see this page for more
http://textpattern.com/faq/92/how-do-i-create-navigation-links

Offline

#5 2007-04-12 11:54:06

Jmz
New Member
Registered: 2007-04-11
Posts: 7

Re: Textpattern Navigation

would that method let me use the icons next to each li though?

Offline

#6 2007-04-12 12:27:03

hilary
Member
Registered: 2006-09-11
Posts: 37

Re: Textpattern Navigation

If you refer to the icons using css, yes!
Using images, I’m not sure how to do that, sorry!

Offline

#7 2007-04-12 13:17:24

Jmz
New Member
Registered: 2007-04-11
Posts: 7

Re: Textpattern Navigation

I think what I’m looking to do now is to have the menu hard coded somewhere and then include it. I’m still new to textpattern and I haven’t got my head around everything yet.
Could I create some sort of form that had the html for my menu and then just call it on the page?

Offline

#8 2007-04-12 15:23:21

hilary
Member
Registered: 2006-09-11
Posts: 37

Re: Textpattern Navigation

You can hardcode it just on the presentation>pages link, just using html: the link would be http://www.mysite.com/sectionname
Or with messy urls it would be http://www.mysite.com/index.php?s=sectionname

You can hardcode them like that..

Offline

#9 2007-04-12 15:54:48

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: Textpattern Navigation

Jmz wrote:

I’m still new to textpattern and I haven’t got my head around everything yet.

This might help: Textpattern Semantic Model.

Could I create some sort of form that had the html for my menu and then just call it on the page?

Yes, that’s what Textpattern forms are for, reusable chunks of code :) Create a form, type ‘misc’, with your menu code in it, and call it on the page with <txp:output_form form="yourformname" />.

Offline

#10 2007-04-12 16:03:21

Jmz
New Member
Registered: 2007-04-11
Posts: 7

Re: Textpattern Navigation

That’s brilliant, thanks Els. I’ll have a look at the link you posted when I get home from work.

Offline

#11 2007-04-12 16:43:16

Zanza
Plugin Author
Registered: 2005-08-18
Posts: 699
Website

Re: Textpattern Navigation

Also, consider ako_nav plugin for simplifying the hardcoded menu. It lets you add classes, ids and span to the menu, it’s section aware (with automatic class=“active” insertion), so it’s a pretty good help for your need.

I often use it in a form, so it’s easy to modify.

Z-

Offline

#12 2007-04-12 17:33:04

Jmz
New Member
Registered: 2007-04-11
Posts: 7

Re: Textpattern Navigation

Thanks for the link, I’m going to go for the other option atm just because its easier, maybe in the future I’ll try another way.

I’ve got one more question now. I installed the social bookmarking plugin from http://www.ako-k.com/archive/150 but now I keep getting an error saying “tag_error <txp:ako_social/> -> Textpattern Warning: unknown_tag: ako_social on line 968” I’m guessing I’ve got the tag in the wrong place or something. On my home page I have <txp:article form=“front_page”/> which shows the articles how I want them so I assumed the <txp:ako_social /> would go in the front_page form but that doesn’t seem to work, any ideas?

Offline

#13 2007-04-12 18:12:52

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: Textpattern Navigation

Is the plugin activated? If so, does it do what it’s supposed to do? If it doesn’t work as expected, you’d better ask in the plugin thread.
If it does, switch to ‘Live’ mode (in Admin > preferences). The warning will probably go away then.

Offline

#14 2007-04-12 18:42:09

anthonybooth
Member
From: UK
Registered: 2007-01-13
Posts: 21
Website

Re: Textpattern Navigation

I usually start by creating my sections first then i create a form called navigation then hard code the following:

<ul>
<txp:if_section name=“home, default”>
<txp:section wraptag=“li” link=1 title=1 name=“home” class=“indicator” />
<txp:else />
<txp:section wraptag=“li” link=1 title=1 name=“home” />
</txp:if_section>

<txp:if_section name=“explained”>
<txp:section wraptag=“li” link=1 title=1 name=“explained” class=“indicator” />
<txp:else />
<txp:section wraptag=“li” link=1 title=1 name=“explained” />
</txp:if_section> ………
</ul>

This way also gives me a hook to apply some css on the class indicator using the if.

I then <txp:output_form form=“navigation” /> on my page just like an include file.

Hope this helps

Anthony


Forever learning.

Offline

#15 2007-04-23 18:10:41

chebureki22
New Member
Registered: 2004-11-13
Posts: 8

Re: Textpattern Navigation

I’m having problems with my navigation. Someone else designed the site and I moved the design into TXP and it works fine. The design could have been done better, but you can’t have everything.

There are two navigation bars: one goes by categories and another goes by sections. The sectional navigation bar was easy to set up, but I’m having difficulty setting up the categories.

Because the site is mostly static and TXP will be used by the owner to edit the content, each category has only one entry. On top of that, one entry that is not categorized appears on the front page. I’m having some trouble to code the TXP template page to view categories when a user clicks on the navigation bar.

It should be simple, but I think I overcomplicated it.

Here’s what I have:

<txp:article />

<txp:if_individual_article> <p><txp:link_to_prev><txp:prev_title /></txp:link_to_prev> <txp:link_to_next><txp:next_title /></txp:link_to_next></p>
<txp:else /> <p><txp:older>Previous</txp:older> <txp:newer>Next</txp:newer></p>
</txp:if_individual_article>

But no pages show up where they’re supposed to..

Thanks for your help…

Last edited by chebureki22 (2007-04-23 18:12:16)

Offline

Board footer

Powered by FluxBB