Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#76 2006-08-31 13:31:18
- lee
- Member
- From: Normandy, France
- Registered: 2004-06-17
- Posts: 831
Re: [plugin] [ORPHAN] ako_nav
Any way to specify a span and class, like:
<code><li><a href=”#”><span class=“myclass”>text</span></a></li></code>
Thanks, Lee
Last edited by lee (2006-08-31 13:32:22)
Offline
Re: [plugin] [ORPHAN] ako_nav
Yup, that one’s coming. ;)
Anything else, anyone?
Offline
#78 2006-08-31 13:37:27
- lee
- Member
- From: Normandy, France
- Registered: 2004-06-17
- Posts: 831
Re: [plugin] [ORPHAN] ako_nav
Actually it’s already there, this thing is even better than I thought.
What have you got instore for us?
Thank you, Lee
Offline
Re: [plugin] [ORPHAN] ako_nav
- Support for native https in TXP (as per this)
- Support for full URLs in the url attribute (http, https, ftp… are any others needed??)
- Support for custom access keys
- Support for custom delimiters (in the event that you’ve got a comma in the name you want to use)
- Support for span id attributes
- Ability to change the class=“active” to class=“whatever”
- Support for first / last child classes…
Now a question for the masses as the first/last child support… How do you all want this one to be implemented? As an additional class that just gets added to the li or a tag, or…? That’s currently my thinking, but hey, if someone’s got a better idea, I’m more than happy to use it.
Uhm, I think that’s all for the moment. There might be some other stuff that I’m leaving out, but I believe that’s it.
Offline
#80 2006-09-04 10:36:15
- lee
- Member
- From: Normandy, France
- Registered: 2004-06-17
- Posts: 831
Re: [plugin] [ORPHAN] ako_nav
Any one help out on this please, I’m stuck,
My url is http://www.mysite.com/services/services-overview
I’m in the services section displaying an article with services-overview as the url only title (as set in the write tab). Problem is the .active is not being set on the a tag.
Thanks,
Lee
Offline
Re: [plugin] [ORPHAN] ako_nav
Thanks again for this plug-in, akokskis.
I have left behind my intention of using no plug-ins at all.
I think ako_nav is better than built-in tags (txp:section and txp:if_section) to make a section menu with class=“active” applied.
I have a suggestion for the plug-in to improve its flexibility.
Following the logic of name and url attributes (that values matchs one-to-one to create the menu), it would be nice a new attribute to apply a different and unique class to each item of the menu.
Something like uclass=“section1,section2,section3,section4”.
This could be also a way to implement the first/last child classes: uclass=“first,,,last”.
BTW, I’m reading the plug-in help and I found this two attributes (aids, liids). I understand that those are for adding an id to the li and <i>a</i> tags. But that will lead to more than one element to the same id applied and ids values should be applied only to one element at time in the same HTML document.
Am I wrong?
Offline
Re: [plugin] [ORPHAN] ako_nav
Thanks again for this plug-in, akokskis.
I have left behind my intention of using no plug-ins at all.
I think ako_nav is better than built-in tags (txp:section and txp:if_section) to make a section menu with class=“active” applied.
Heh, thanks. Glad to know that it’s appreciated and working out well.
Following the logic of name and url attributes (that values matchs one-to-one to create the menu), it would be nice a new attribute to apply a different and unique class to each item of the menu.
Something like uclass=“section1,section2,section3,section4”.
This could be also a way to implement the first/last child classes: uclass=“first,,,last”.
I’m actually putting in first / last child support on the <code>li</code> and <code>a</code> tags in this next release, which I’m hoping to get out relatively soon (it’s been forever since the last release)
BTW, I’m reading the plug-in help and I found this two attributes (aids, liids). I understand that those are for adding an id to the li and <i>a</i> tags. But that will lead to more than one element to the same id applied and ids values should be applied only to one element at time in the same HTML document.
Am I wrong?
Well, actually, those two attributes already accept a list of comma seperated values as to their attributes, so each element will only have one id.
Offline
Re: [plugin] [ORPHAN] ako_nav
akokskis wrote:
Well, actually, those two attributes already accept a list of comma seperated values as to their attributes, so each element will only have one id.
That was what I was suggesting! :D
I should have tried before requesting!
Thanks again!
Offline
Re: [plugin] [ORPHAN] ako_nav
Heh, no worries.
And, you’re welcome!
Offline
Re: [plugin] [ORPHAN] ako_nav
People liking this plugin are probably not programmers or good CSS designers.
Its intention was not bad but, wait a minute… It contains dozens of options that are useless 99% of the time because you don’t need them or because you can achieve the same effect by using CSS stylesheets the right way or adding a snippet of HTML code above or below the plugin call in your template.
But it’s when I looked at the code (about 11,7kb of complex and repetitive code, 8 different functions!) that, after screaming, I decided to write my own plugin to do the same thing, well, in a simpler way. It is about 1,2kb of code.
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
Re: [plugin] [ORPHAN] ako_nav
cbeyls wrote:
People liking this plugin are probably not programmers or good CSS designers.
I like this plug-in. I’m not a programmer but I consider myself a good CSS designer (with a lot to learn yet). So your statement is half wrong.
You could have said something better or nicer too.
People doing comments like yours are probably not good people or are looking for attention or…
Its intention was not bad but, wait a minute… It contains dozens of options that are useless 99% of the time because you don’t need them or because you can achieve the same effect by using CSS stylesheets the right way or adding a snippet of HTML code above or below the plugin call in your template.
Again, another un-constructive critic. You could have been not only nicer, but have said something positive.
Yes, “adding a snippet of HTML code above or below the plugin call in your template” is an option, but maybe, I would like to use some attributes in the plug-in to achieve the same, just for having my templates cleaner and lighter.
But it’s when I looked at the code (about 11,7kb of complex and repetitive code, 8 different functions!) that, after screaming, I decided to write my own plugin to do the same thing, well, in a simpler way. It is about 1,2kb of code.
Ah… you want to promote your plug-in. Yes, I saw it few days ago and I was about to ask you the differences between your plug-in and akokskis plug-in.
It would have been good to read that comparission in your above post.
I will give your plug-in a try, because I like low-weight and optimized plug-ins. Thanks for that and for others like the live search plug-in (now, I remember you also made some critics also to wilshire’s plugin).
BTW, people liking the “matrix” image at the top of your site or your Flash photogallery are probably… … … ;)
Offline
Re: [plugin] [ORPHAN] ako_nav
First: no, I don’t like Flash, and I’m planning to remove this unmaintained gallery as soon as the new version of the excellent vdh_flickr plugin is released. As for the greenish image it’s only there temporarily because of my birthday. And I’m absolutely not a professional designer, just a programmer, but I do what I can.
Talking about CSS, I’m curious soo see in which case you absolutely need ako_nav to achieve an effect. I agree, I can add one or two more options to my plugin (and I will) but not more.
But well, anyway I’m not here to promote my plugin, since I don’t ask any money for it, nor any publicity, and my ego is okay. I just wrote it for myself then I decided to share it with others, writing the docs etc.
So, sorry if my post looked aggressive, I’m just here to help. As you’ll see, when I do a remark, I always propose an alternative solution.
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
Re: [plugin] [ORPHAN] ako_nav
Hi Adrian, great plugin.
I’m having the same ‘messy url’ problem as an earlier post – the ‘active’ class doesn’t get applied. Did you ever solve this?
I use your plugin on a few sites, but this is the first time I’ve had to use it with messy urls.
Offline
Re: [plugin] [ORPHAN] ako_nav
- Addition of accesskeys attribute
- Addition of spanids attribute
- Support for https://, ftp:// in url attribute
- Support for https:// as through txp defined
PROTOCAL - Attributes:
acticlass,delim,<a>and<li>first / last child support
- First child class on
<a>tag:afchild - First child class on
<li>tag:lifchild - Last child class on
<a>tag:alchild - Last child class on
<li>tag:lifchild
acticlass– instead ofclass="active", it’sclass="[ACTICLASS]"delim– instead of using comma delimited lists for the attributes that take a list, use whatever you want.accesskeys– A list of comma (ordelim) separated values for the access keys on the linksspanids– A list of comma (ordelim) separated values for theidattributes on the<span>tags.
I do want to note one thing however…
I have tested this fairly thoroughly, but there’s still the chance that a few slight issues exist with this code. It was pretty much totally re-written for this release. I don’t foresee any issues, but if you are faint of heart, I’d suggest you let someone else try it out.
That being said, I’d love for you all to try it out and give me some feedback, tell me that (hopefully) everything works wonderfully, etc. etc.
Offline
#90 2006-10-16 22:28:50
- lee
- Member
- From: Normandy, France
- Registered: 2004-06-17
- Posts: 831
Re: [plugin] [ORPHAN] ako_nav
Thanks for the update, great work
Offline