Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2006-09-19 19:34:37

cbeyls
Archived Plugin Author
From: Brussels, Belgium
Registered: 2005-09-12
Posts: 136
Website

cbs_navigation_menu

Introduction

This plugin allows to create a custom navigation menu based on Textpattern sections and/or full external URL’s. You can choose which sections you want to display in which order and style the current section differently.

Or, instead of sections you can specify full URL’s (starting with http://, ftp://, mailto: or any other prefix) and they will be linked “as is”.

You can also specify access keys for each menu entry.

More information

For complete information about the plugin, please look at the official page on the Textpattern Resources Site.


My plugins : cbs_live_search (improved) – cbs_category_list – cbs_navigation_menu – cbs_gravatar (updated) – cbs_article_index – cbs_maintenance_mode (new) – cbs_section_language (new)

Offline

#2 2006-09-19 19:47:20

cbeyls
Archived Plugin Author
From: Brussels, Belgium
Registered: 2005-09-12
Posts: 136
Website

Re: cbs_navigation_menu

I’ll answer some questions posted as comments on the official page of the plugin.

Question from Jo:

Would be a great plugin for me (exactly what I was looking for!) only I consistently get the following error: “Textpattern Warning: Unknown tag on line 911”. This only happens on second level archived pages, but on my main page the menu doesn’t output at all. I’m using the latest version of textpattern – any ideas?

Your error is related to the tags you use in your template, that’s why textpatten warns you that the tag is unknown. It has nothing to do with the plugin, it’s probably a typo in your template, for example a space char between “txp:” and the name of the tag.

Question from Warren:

Does this plugin only allow one instance (one menu) per page?

You can use as many instances as you want in the same page, no problem.

Last edited by cbeyls (2006-09-19 19:54:46)


My plugins : cbs_live_search (improved) – cbs_category_list – cbs_navigation_menu – cbs_gravatar (updated) – cbs_article_index – cbs_maintenance_mode (new) – cbs_section_language (new)

Offline

#3 2006-09-23 12:22:32

lee
Member
From: Normandy, France
Registered: 2004-06-17
Posts: 831

Re: cbs_navigation_menu

Looks interesting I’ll give it a try. Thanks.

Offline

#4 2006-09-23 16:24:34

cbeyls
Archived Plugin Author
From: Brussels, Belgium
Registered: 2005-09-12
Posts: 136
Website

Re: cbs_navigation_menu

Question from Marios:

<em>Would it be possible to have an attribute, to get the active section wrapped with span or strong and strip the anchor tags ?</em>

I’ll release a new version with a new attribute that allows to remove the anchor for the active section. Then, you don’t need to wrap the active section with a span or any other tag to make it appear differently. You can achieve that with CSS. Let me explain how.

Updated 2006-09-25: After reflexion and the addition of the ids attribute to the plugin, I changed my mind and I decided that the option will replace the anchor with a span tag as you suggested, instead of just removing it. This allows to preserve both the class and id attributes for a better control of CSS styling: they are applied to the span instead of the anchor. The new version of the plugin, including these features, is available now.

Last edited by cbeyls (2006-09-25 02:51:58)


My plugins : cbs_live_search (improved) – cbs_category_list – cbs_navigation_menu – cbs_gravatar (updated) – cbs_article_index – cbs_maintenance_mode (new) – cbs_section_language (new)

Offline

#5 2006-09-25 02:37:09

cbeyls
Archived Plugin Author
From: Brussels, Belgium
Registered: 2005-09-12
Posts: 136
Website

Re: cbs_navigation_menu

New version up : v0.4

See the changelog for details.


My plugins : cbs_live_search (improved) – cbs_category_list – cbs_navigation_menu – cbs_gravatar (updated) – cbs_article_index – cbs_maintenance_mode (new) – cbs_section_language (new)

Offline

#6 2006-09-25 08:01:01

rossharvey
Member
From: Earth. Sometimes.
Registered: 2005-03-16
Posts: 233
Website

Re: cbs_navigation_menu

This is VERY useful, except I had one problem – when using it for my main navigation, it would append the current section to the URL.

For example, on the homepage it would link correctly:

mysite.com/tech

But when in the tech section, it would link:

mysite.com/tech/tech

Any ideas?

Last edited by rossharvey (2006-09-25 08:01:26)

Offline

#7 2006-09-25 13:42:24

cbeyls
Archived Plugin Author
From: Brussels, Belgium
Registered: 2005-09-12
Posts: 136
Website

Re: cbs_navigation_menu

It seems that the tech section is not interpreted as a section, so the href in the anchor is just “tech” everywhere. Why? I don’t know yet.

  • Does the section you are trying to link contain a “:” in its name?
  • Can you tell me which Textpattern version you are using?
  • Can you show me the markup that causes this error in your template?
  • Are you using the clean URL mode?
  • Is the incrimined section properly configured?
  • Is your site URL properly set in the Textpattern preferences panel (without any starting “http://” or final “/”) ?

Last edited by cbeyls (2006-09-25 13:44:02)


My plugins : cbs_live_search (improved) – cbs_category_list – cbs_navigation_menu – cbs_gravatar (updated) – cbs_article_index – cbs_maintenance_mode (new) – cbs_section_language (new)

Offline

#8 2006-09-25 20:03:11

marios
Archived Plugin Author
Registered: 2005-03-12
Posts: 1,253

Re: cbs_navigation_menu

cbeyls, great work.

I saw your other work on the moo.tools library as well, which sounds quite innovative.
(Didn’t have time yet to try out those, but I feel obliged to do so, once I finish my current work)

regards, marios


⌃ ⇧ < ⌃ ⇧ >

Offline

#9 2006-09-26 07:30:36

lee
Member
From: Normandy, France
Registered: 2004-06-17
Posts: 831

Re: cbs_navigation_menu

Working nicely…

Offline

#10 2006-09-26 15:55:32

rossharvey
Member
From: Earth. Sometimes.
Registered: 2005-03-16
Posts: 233
Website

Re: cbs_navigation_menu

Hi cbeyls, thanks for the reply. You will have to excuse me, the error was with your other plugin – cbs_category_list. I edited the code to fix the problem, to this…

<code>
$out[] = tag(str_replace(‘& ‘,’& ‘, $title),‘a’,’ href=”/’.$s.’/’.$name
</code>
<p>
Works fine now.
</p>

cbeyls wrote:

It seems that the tech section is not interpreted as a section, so the href in the anchor is just “tech” everywhere. Why? I don’t know yet.

  • Does the section you are trying to link contain a “:” in its name?
  • Can you tell me which Textpattern version you are using?
  • Can you show me the markup that causes this error in your template?
  • Are you using the clean URL mode?
  • Is the incrimined section properly configured?
  • Is your site URL properly set in the Textpattern preferences panel (without any starting “http://” or final “/”) ?

Last edited by rossharvey (2006-09-26 15:57:16)

Offline

#11 2006-09-26 18:57:42

lee
Member
From: Normandy, France
Registered: 2004-06-17
Posts: 831

Re: cbs_navigation_menu

Hey Ross, which bit does this replace? Thanks, Lee.

Offline

#12 2006-09-26 19:17:33

rossharvey
Member
From: Earth. Sometimes.
Registered: 2005-03-16
Posts: 233
Website

Re: cbs_navigation_menu

Hi Lee, I can’t remember the line number – just search for the first few characters, there is only that one instance in the code so it should be easy to find.

<code>
href=”/’.$s.’/’
</code>
<p>
That is the area in which the edit is made. Sorry I cannot be more specific, I am on my home PC, and have forgotten my dev TXP install password :¬)

lee wrote:

Hey Ross, which bit does this replace? Thanks, Lee.

Offline

Board footer

Powered by FluxBB