Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2004-04-06 21:46:29

kusor
Member
From: Spain
Registered: 2004-03-07
Posts: 93
Website

[plugin] [ORPHAN] ppc_navigation_aid

Another obvious plugin: ppc_navigation_aid

Provides navigation aids, using the XHTML <link> tag.

Download ppc_navigation_aid, enable the plugin and read the next paragraphs to learn how to use it.

You can add navigation aids to your home page, to the previous and next articles, and to the section which the current article belongs to.

The tag <txp:ppc_navigation_aid /> needs a type attribute to know what type of aid you want to provide. Allowed values (for now) are: home, prev, next and top.
You can also specify an optional title attribute in order to overrides the default values taken for the link tag title attribute. These values are, by default, taken from your language file.

An example of a page with all the possible navigation aids should include on the page template <head> section the next:

<txp:ppc_navigation_aid type="home" /> <txp:ppc_navigation_aid type="top" /> <txp:ppc_navigation_aid type="prev" /> <txp:ppc_navigation_aid type="next" />

The plugin will output silently when a specified navigation aid is not possible for the current page.

For now, the plugin will outputs the prev and next navigation aids for article pages only. Due to the way textpattern renders the page fails when you use the newer and older tags before the article is parsed – and navigation aids will be, obviously before – it seems appropriate to hope until the next textpattern release to implement these aids for section and category pages .

More about how navigation aids improve accessibility at Dive Into Accessibility.

[Edited to prevent curly quotes on tag attributes.]

Last edited by kusor (2004-04-08 13:17:56)

Offline

#2 2004-04-06 22:38:12

Echo5ive
New Member
From: Stockholm, Sweden
Registered: 2004-03-14
Posts: 7
Website

Re: [plugin] [ORPHAN] ppc_navigation_aid

That’s a very nice plugin, and saves me the trouble of adding those tags manually. However, I can’t get it to work — it doesn’t output anything at all, on any page. (Txp 1.17)


VC200 member!

Offline

#3 2004-04-07 07:19:36

kusor
Member
From: Spain
Registered: 2004-03-07
Posts: 93
Website

Re: [plugin] [ORPHAN] ppc_navigation_aid

It’s strange.

You can view it in action on every article pages of the Tag Manual. For example, give a look at the source code of this page

Have you enabled the plugin?.

Offline

#4 2004-04-07 07:52:35

kusor
Member
From: Spain
Registered: 2004-03-07
Posts: 93
Website

Re: [plugin] [ORPHAN] ppc_navigation_aid

I’ve added a minor update to the plugin – missing the slash at the end of the link tag. You can download it at the same place.

Offline

#5 2004-04-07 18:43:05

mamash
Member
From: Prague
Registered: 2004-02-21
Posts: 127
Website

Re: [plugin] [ORPHAN] ppc_navigation_aid

  1. There is typo in the actual link returning statement (those slashes and quote marks at the end of the line).
  2. The simple if($var) conditions should better be replaced by if(!empty($var)) to avoid the unnecessary “Undefined variable” warning notices.

Who’s gonna textdrive you home tonight?

Offline

#6 2004-04-07 20:19:48

ramanan
Plugin Author
From: Toronto
Registered: 2004-03-12
Posts: 323
Website

Re: [plugin] [ORPHAN] ppc_navigation_aid

I was having problems with this plugin, but I got it to work.

I copied the code from Kursor’s message to display the tags. The quotes in his message are curly however (because this forum textiles your messages up), which is how they got pasted into my page template. So the type attribute was not being passed to the plugin, and nothing was being done. To fix, make sure that in your page template, you have plain quotes around the type attribute, not curly quotes.

Offline

#7 2004-04-08 09:10:13

kusor
Member
From: Spain
Registered: 2004-03-07
Posts: 93
Website

Re: [plugin] [ORPHAN] ppc_navigation_aid

OK, it seems that in the cut and paste step from plugin code generation to compress it I’ve forget to modify the plugin template.

I’ve tried to complete the plugin serialization and compressing in one standalone step through php, and it seems the new code fixes the missing quote, and adds the mamash suggestion – thanks – to prevent undefined notices.

So, the new plugin code should works: Navigation aid-0.3

Can anybody install it and say if htere is any problem?.

Now, I’m going to run textpattern with debug mode enabled, and try to find the undefined messages, if any. Can you test the new code also, mdtp?.

Thanks.

Offline

#8 2004-04-08 12:15:27

mamash
Member
From: Prague
Registered: 2004-02-21
Posts: 127
Website

Re: [plugin] [ORPHAN] ppc_navigation_aid

Is this particular plugin turned on in the plugin administration?


Who’s gonna textdrive you home tonight?

Offline

#9 2004-04-08 12:41:05

Echo5ive
New Member
From: Stockholm, Sweden
Registered: 2004-03-14
Posts: 7
Website

Re: [plugin] [ORPHAN] ppc_navigation_aid

I got it working — I too copied the actual txp markup from your post, so I got curly quotes there. That’s why it didn’t output anything.

However, it outputs this link:

<link rel="top" href="/default" title="Section">

I have no section called “default,” so that link leads to a 404.


VC200 member!

Offline

Board footer

Powered by FluxBB