Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2005-02-13 05:30:25

akokskis
Plugin Author
From: Baltimore-ish, USofA
Registered: 2004-11-28
Posts: 230
Website

[plugin] [ORPHAN] ako_nav v0.1

This is my first plugin, something not all that tricky, but in my opinion, quite useful.
Basically, it builds a nav bar with a few arguments. It also dynamically adds <code>class=“active”</code> to the a tag, dependant on what page it is.

Download here

I’m going to get some more documentation up within the next day, but for now you can just look at what is provided in the actual plugin.

Last edited by akokskis (2005-10-09 23:09:34)


My Photoblog, and my personal site. Got nav? ako_nav.
Thanks for taking the time to look…

— vc3 —

Offline

#2 2005-02-13 10:18:22

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 4,599
Website

Re: [plugin] [ORPHAN] ako_nav v0.1

had to add

<pre><?php
$plugin=’ </pre>

at the beginning and

<pre>=’
?></pre>

at the end of your downloadable txt file to be able to import it.

For those interested, the help infos then read as follows:

ako_nav Help File
A dynamic portable navigation creator

What does it do?

  • Creates a primary div
  • Inside the div, a heading is added for the Nav bar.
  • Creates a ul to hold the nav bar.
  • Goes through given urls and names of pages and dynmically adds them as li’s
  • class=“active” is automatically added to the current page’s li.

Examples

The simplest form is this:

<pre> <txp:ako_nav name=“home,about,contact” url=”/,/about,/contact” />
</pre>

it will produce something like this:
<pre> <div> <h2>Navigation</h2> <ul> <li><a href=”/”>home</a></li> <li><a href=”/about”>about</a></li> <li><a href=”/contact”>contact</a></li> </ul> </div>
</pre>

Add some of the tags below to get a lot more creative.

Tags

Required
  • name – This is a list of page names, delimited by commas (and no spaces)
  • url – This is a list of page url’s, following the same order as the page names, and also delimited by commas (and no spaces)
Optional
  • title – This is the title attribute for the a tag.
  • divid – This is an id for the div container.
  • headid – This is an id for the header tag.
  • ulid – This is an id for the ul tag.
  • divclass – This is a class for the div container.
  • headclass – This is a class for the header tag.
  • ulclass – This is a class for the ultag.
  • headtx – This is the text inside the header its self. By default, this is “Navigation

Last edited by jakob (2005-02-13 10:20:18)


TXP Builders – finely-crafted code, design and txp

Offline

#3 2005-02-13 15:40:57

wilshire
Plugin Author
From: Akron, Ohio
Registered: 2004-08-27
Posts: 656
Website

Re: [plugin] [ORPHAN] ako_nav v0.1

akokskis – This is great. Something I’ve been thinking of doing. One thing that would be great is if you could turn off the header text.

Otherwise, this will be a great help.

By the way, the plugin installs fine. You just have to paste the code into the box on the plugin screen in RC1 or later.

Last edited by wilshire (2005-02-13 22:03:17)

Offline

#4 2005-02-13 16:55:19

soulship
Member
From: Always Sunny Charleston
Registered: 2004-04-30
Posts: 669
Website

Re: [plugin] [ORPHAN] ako_nav v0.1

Nice one this looks great. With a little styling it looks like alot can be done with this. Thanks for the contribution!

Jamie

Offline

#5 2005-02-13 23:58:03

akokskis
Plugin Author
From: Baltimore-ish, USofA
Registered: 2004-11-28
Posts: 230
Website

Re: [plugin] [ORPHAN] ako_nav v0.1

Thanks for the comments so far guys. I appreciate it.

To the suggestion of wilshire, I’ve added an attribute to be able to turn off the header text – headon. This takes either a 0 (its off) or a 1 (its on). By default, this is on.

Download Link

Any other comments / suggestions / [anything] ?

Last edited by akokskis (2005-10-09 23:09:59)


My Photoblog, and my personal site. Got nav? ako_nav.
Thanks for taking the time to look…

— vc3 —

Offline

#6 2005-03-25 16:27:43

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

Re: [plugin] [ORPHAN] ako_nav v0.1

Anyone got a copy of this I could have to install, it’s gone missing on Adrian’s site and Adrian is away.

leeaston @ gmail.com

Thanks
Lee

Offline

#7 2005-03-25 17:16:23

akokskis
Plugin Author
From: Baltimore-ish, USofA
Registered: 2004-11-28
Posts: 230
Website

Re: [plugin] [ORPHAN] ako_nav v0.1

Um, it’s not missing on my site. Here’s the link

Last edited by akokskis (2005-10-09 23:10:13)


My Photoblog, and my personal site. Got nav? ako_nav.
Thanks for taking the time to look…

— vc3 —

Offline

#8 2005-03-25 17:19:22

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

Re: [plugin] [ORPHAN] ako_nav v0.1

Thanks, it must be Friday.

Offline

#9 2005-03-25 17:38:18

akokskis
Plugin Author
From: Baltimore-ish, USofA
Registered: 2004-11-28
Posts: 230
Website

Re: [plugin] [ORPHAN] ako_nav v0.1

Heh, sure is…

No problem.


My Photoblog, and my personal site. Got nav? ako_nav.
Thanks for taking the time to look…

— vc3 —

Offline

#10 2005-03-26 02:11:04

rbl
Member
From: Portugal
Registered: 2004-02-25
Posts: 40

Re: [plugin] [ORPHAN] ako_nav v0.1

Akokskis, thanks for the plugin! =)

Offline

#11 2005-04-03 02:37:06

icubyx
Member
From: India
Registered: 2004-12-16
Posts: 21

Re: [plugin] [ORPHAN] ako_nav v0.1

hi, I tried using this plugin with RC1 installed in the ‘txp’ subdirectory, but without success.
The code looks like this:

<txp:ako_nav name=“home,about,article” url=”/txp,/txp/about,/txp/article” />

However, only the ‘home’always remains highlighted no matter where I navigate to. Is there something I am doing wrong?


only change is constant

Offline

#12 2005-04-03 02:37:12

icubyx
Member
From: India
Registered: 2004-12-16
Posts: 21

Re: [plugin] [ORPHAN] ako_nav v0.1

hi, I tried using this plugin with RC1 installed in the ‘txp’ subdirectory, but without success.
The code looks like this:

<txp:ako_nav name=“home,about,article” url=”/txp,/txp/about,/txp/article” />

However, only the ‘home’always remains highlighted no matter where I navigate to. Is there something I am doing wrong?


only change is constant

Offline

Board footer

Powered by FluxBB