Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#181 2005-11-18 21:56:02

Anton
Plugin Author
From: Alingsås, Sweden
Registered: 2004-11-16
Posts: 138
Website

Re: mem_glinklist: Grouped Link List

cool manfre, thanx a million.

Offline

#182 2006-02-16 19:36:51

maniqui
Member
From: Buenos Aires, Argentina
Registered: 2004-10-10
Posts: 3,070
Website

Re: mem_glinklist: Grouped Link List

I’m trying to generate a “filter links by category” list.

I used to use the rss_linkcat_list plug-in but I have found that it seems to be possible to achieve the same using mem_glinklist, or am I wrong?

I have a section like “www.mydomain.com/links/”
I’m using the <txp:mem_categories /> tag to output the categories list.

But the generated links point to “www.mydomain.com/?lc=services”. So, when you click, you get the homepage again.

The category links should point “www.mydomain.com/<b>links</b>/?lc=services”, but I dont know how to generate them with the /link/

The rss_linkcat_list has the linktosection="" attribute… so, i’m looking for something similar en mem_glinklist or more exactly, in mem_categories

any ideas? thanks in advance

Last edited by maniqui (2006-02-16 19:41:12)


La música ideas portará y siempre continuará

TXP Builders – finely-crafted code, design and txp

Offline

#183 2006-02-16 20:30:38

maniqui
Member
From: Buenos Aires, Argentina
Registered: 2004-10-10
Posts: 3,070
Website

Re: mem_glinklist: Grouped Link List

While waiting for a solution, I will use the combination of rss_linkcat_list + mem_glinklist that works flawlessly.

But if someone (Manfre? r u there?) points me in the right direction to do the same with mem_glinklist, I would be able to reduce my plug-in list by one (no needing of rss_linkcat_list).

thanks.


La música ideas portará y siempre continuará

TXP Builders – finely-crafted code, design and txp

Offline

#184 2006-02-21 20:35:36

Manfre
Plugin Author
From: North Carolina
Registered: 2004-05-22
Posts: 588
Website

Re: mem_glinklist: Grouped Link List

Posted 0.8.4, a minor update that contains a few things.

1. maniqui, you will be happy. I added a “baseurl” argument to the mem_cat_link tag. So you would just need use the tag something like this <txp:mem_cat_link baseurl="/links/" argname="lc" /> to get the desired result of <a href="/links/?lc=blah">Blah</a>

Edit
This argument will probably not work correctly for clean urls since those rely upon a url following the pattern /category/cat_name. The above example would yeild a url matching “/links/category/cat_name”, which I do not think will be detected properly by txp. If anyone feels like testing this, please do and chime in whenever.
/Edit

2. stacey, I fixed the problem with the uncategorized argument being ignored and resulting in no heading.

3. anton, category filtering is still on the todo list. sorry.

Last edited by Manfre (2006-02-21 20:37:54)

Offline

#185 2006-02-21 21:01:38

maniqui
Member
From: Buenos Aires, Argentina
Registered: 2004-10-10
Posts: 3,070
Website

Re: mem_glinklist: Grouped Link List

Hi Manfre!

I’m happy… and I dont care it is not working for me! ;)
Really, I dont know…

I’m using
<txp:mem_cat_link baseurl="/enlaces/" argname="lc"><txp:mem_cat_name /></txp:mem_cat_link>

But this outputs links like this

<ul><li><a href="/enlaces/?lc=" title="">fabricantes</a></li>
<li><a href="/enlaces/?lc=" title="">informacion</a></li>
<li><a href="/enlaces/?lc=" title="">musica</a></li>
<li><a href="/enlaces/?lc=" title="">radios online</a></li>
<li><a href="/enlaces/?lc=" title="">servicios</a></li></ul>

That is, without the category.

Also, in the plug-in help, I have noticed (both in 0.8.1 and 0.8.4) that both the mem_categories and the mem_cat_link has the “argname—(optional) The url query argument used for category links. Default is ‘lc’”

is this correct? I dont know what the argname in mem_categories does.

Thanks, Manfre!


La música ideas portará y siempre continuará

TXP Builders – finely-crafted code, design and txp

Offline

#186 2006-02-21 21:32:08

Manfre
Plugin Author
From: North Carolina
Registered: 2004-05-22
Posts: 588
Website

Re: mem_glinklist: Grouped Link List

Lets try this again. Should work now.

The argname value in mem_categories will take priority over the value passed to mem_cat_link. I don’t know why I made this possible, but I did. I guess I was thinking along the lines of having the ability to use different types of links in the same form or something. I’m sure it was a really cool feature that has gone straight in to the void. ‘lc’ is the default value for any argname attribute, except mem_glinklist, which defaults none (‘’).

NOTE mem_cat_link previously defaulted to ‘c’. I am changing this to be consistent with everything else. You all have warned. :)

Offline

#187 2006-02-21 21:59:36

maniqui
Member
From: Buenos Aires, Argentina
Registered: 2004-10-10
Posts: 3,070
Website

Re: mem_glinklist: Grouped Link List

Thanks again, Manfre.

Still having problems…

1. I still cannot filter as I do with rss_linkcat_list + mem_glinklist.
2. when I put argname="c", the plug-in still outputs the links as ?lc=categoryname.

This are the snippets I’m using:

To output the list of links (i have tried with both argname=“c” and argname=“lc”)

<div style=“font-size: 85%;overflow:auto”>
<txp:if_category>
<txp:mem_glinklist form="links" columns="1" columnwraptag="ul" columnclass="" listwraptag="div" listclass="" headwraptag="h3" headclass="" argname="c" />
<txp:else />
<txp:mem_glinklist form="links" columns="1" columnwraptag="ul" columnclass="" listwraptag="div" listclass="" headwraptag="h3" headclass="" />
</txp:if_category>
</div>

To output the category link list

<txp:mem_categories type="link" form="linkcatlist" wraptag="ul" break="li" />

The form for the above.

<txp:mem_cat_link baseurl="/enlaces/" argname="c"><txp:mem_cat_title /></txp:mem_cat_link>

It doesnt make any difference if I change the argname, because, as I say, it keeps outputting the “?lc”

Last edited by maniqui (2006-02-21 22:02:55)


La música ideas portará y siempre continuará

TXP Builders – finely-crafted code, design and txp

Offline

#188 2006-02-21 22:23:06

Manfre
Plugin Author
From: North Carolina
Registered: 2004-05-22
Posts: 588
Website

Re: mem_glinklist: Grouped Link List

Move the argname attribute from mem_cat_link to mem_categories and everything will work fine. mem_categories is determining its own value and then using that value to overwrite the value in mem_cat_link.

What filtering is missing? Do you mean the linktosection attribute? If so, you just need to specify the proper baseurl to get the same effect. When you would use linktosection="banter", you would use baseurl="/banter/" for mem_cat_link (this assumes that textpattern is installed to the root of the www space).

Offline

#189 2006-02-21 23:02:16

maniqui
Member
From: Buenos Aires, Argentina
Registered: 2004-10-10
Posts: 3,070
Website

Re: mem_glinklist: Grouped Link List

Many thanks, Manfre… I’m sorry to say it’s not working yet :(

1. nothing different when moving argname="lc" to mem_categories
2. if, in mem_categories, I try argname="c", the outputted code is:

<ul><li><a href="/enlaces/category/fabricantes" title="fabricantes">fabricantes</a></li>
<li><a href="/enlaces/category/informacion" title="información">información</a></li>
<li><a href="/enlaces/category/musica" title="música">música</a></li>
<li><a href="/enlaces/category/radios_online" title="radios online">radios online</a></li>
<li><a href="/enlaces/category/servicios" title="servicios">servicios</a></li></ul>

Those URLs doesnt work for me.

Hey, you can check here.

What filtering is missing?

I mean, I still cannot filter the links per category, when clicking in the link category list.

BTW: important note: now I remember that, when using rss_linkcat_list, I have never achieved to get the “filter” working with the argument “lc”. It only worked when using argument “c”.
So, now, I can conclude that there is something broken related with the “lc” argument in mem_glinklist.
Could I be right?

Edit: yes, i’m right. If I manually type in the URL the argument (something like http://www.midi-midi.com.ar/enlaces/?c=servicios) and set the mem_glinklist argname attribute to “c”, the filter by category works as expected.
So, the problem is that mem_glinklist is not “responding” to the “?lc” argument in the URL.
And, also, if mem_categories argname is “c”, the generated links are wrong.

Last edited by maniqui (2006-02-21 23:07:28)


La música ideas portará y siempre continuará

TXP Builders – finely-crafted code, design and txp

Offline

#190 2006-02-23 20:30:14

maniqui
Member
From: Buenos Aires, Argentina
Registered: 2004-10-10
Posts: 3,070
Website

Re: mem_glinklist: Grouped Link List

Hi manfre! sorry for bump this.
I’m not sure if you have read my last post…

I have found that what is not working is this snippet (it’s a simple form). I mean, if I use the following snippet, the links to “filter by category” dont work.

<div style=“font-size: 85%;overflow:auto”>
<txp:if_category>
<txp:mem_glinklist form="links" columns="1" columnwraptag="ul" columnclass="" listwraptag="div" listclass="" headwraptag="h3" headclass="" argname="lc" />
<txp:else />
<txp:mem_glinklist form="links" columns="1" columnwraptag="ul" columnclass="" listwraptag="div" listclass="" headwraptag="h3" headclass="" />
</txp:if_category>
</div>

But if I simple change the form to:

<div style=“font-size: 85%;overflow:auto”>
<txp:mem_glinklist form="links" columns="1" columnwraptag="ul" columnclass="" listwraptag="div" listclass="" headwraptag="h3" headclass="" argname="lc" />
</div>

the links to “filter by category” DO work!!

But… when in section root (/enlaces/) the whole list of links (all my links) doesnt appear.

So, when using <txp:if_category>, the snippet doesnt work!
So, I can conclude that <txp:if_category> doesnt consider the call to URLs like “?lc=_categoryname_” as to be in a category context, because with the first snippet the site (when clicking in a “filter by category” link) always returns what is below the <txp:else /> estatement.
Do I explain myself?

thanks in advance.


La música ideas portará y siempre continuará

TXP Builders – finely-crafted code, design and txp

Offline

#191 2006-02-23 20:50:16

Manfre
Plugin Author
From: North Carolina
Registered: 2004-05-22
Posts: 588
Website

Re: mem_glinklist: Grouped Link List

To be usable with if_category, you will need to set argname=“c”. The category argument used by txp is “c”. I intentionally made this plugin use “lc” because I wanted it to be possible to distinguish between a txp generic category verses my plugin’s category.

Offline

#192 2006-02-23 21:11:07

maniqui
Member
From: Buenos Aires, Argentina
Registered: 2004-10-10
Posts: 3,070
Website

Re: mem_glinklist: Grouped Link List

Thanks Manfre for your quick reply.
We are on the road again. Still a problem to solve in mem_categories for this to work.

When using this code:

<txp:mem_categories type="link" form="linkcatlist" argname="lc" />
.
the output is for the created “filter by category” link is

<a href="http://www.midi-midi.com.ar/enlaces/?lc=categoryname">categorytitle</a>
.
BUT when using:

<txp:mem_categories type="link" form="linkcatlist" argname="c" />
.
The output is for the link to “filter by category”:

<a href="http://www.midi-midi.com.ar/enlaces/category/categoryname">categorytitle</a>
.
So, then, when clicking in the link, nothing happens, because m_glinklisk is expecting for an URL that finish in “?c=categoryname” but it gets one with “/category/categoryname”

Last edited by maniqui (2006-02-23 21:35:48)


La música ideas portará y siempre continuará

TXP Builders – finely-crafted code, design and txp

Offline

Board footer

Powered by FluxBB