2004-04-06 21:46:29

kusor
Member
epsilon
From: Spain
Website

[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

 

2004-04-06 22:38:12

Echo5ive
New Member
alpha
Real name: Johan Svensson
From: Stockholm, Sweden
Website

Re: [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

 

2004-04-07 07:19:36

kusor
Member
epsilon
From: Spain
Website

Re: [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

 

2004-04-07 07:52:35

kusor
Member
epsilon
From: Spain
Website

Re: [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

 

2004-04-07 18:43:05

mamash
Admin
zêta
Real name: Filip Hajny
From: Prague
Known languages: cz, en, ru, de, fr
Website

Re: [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

 

2004-04-07 20:19:48

ramanan
Plugin Author
iota
Real name: Ramanan Sivaranjan
From: Toronto
Website

Re: [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

 

2004-04-08 09:10:13

kusor
Member
epsilon
From: Spain
Website

Re: [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

 

2004-04-08 12:15:27

mamash
Admin
zêta
Real name: Filip Hajny
From: Prague
Known languages: cz, en, ru, de, fr
Website

Re: [ORPHAN] ppc_navigation_aid

Is this particular plugin turned on in the plugin administration?


Who’s gonna textdrive you home tonight?

Offline

 

2004-04-08 12:41:05

Echo5ive
New Member
alpha
Real name: Johan Svensson
From: Stockholm, Sweden
Website

Re: [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

 

2004-04-08 13:13:17

kusor
Member
epsilon
From: Spain
Website

Re: [ORPHAN] ppc_navigation_aid

I think it’s all fixed now.

Anyway, I’m having a lot of troubles updating the plugin.

Currently, I’m gziping the plugin using php. I’ve created a small script to output the contents of the plugins after to gzip it, reading from the gzip file.

The screen output looks well, but when I try to update it, nothing changes in the instaled code.

last version fix teh misplaced double quote, and checks

if(!empty($type)){

and

if(!empty($s) && $section!="default"){

Can you see these changes?. Any idea?.

Offline

 

Powered by FluxBB