Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Re: mem_glinklist: Grouped Link List
To get the list items to match, create a link form “link_form” with the following “< txp:linkdesctitle /> |”
The plugin tag in the page template should look something like below:
<txp:mem_glinklist form="link_form" class="mylist" wraptag="entry" headwraptag="leftcol" listwraptag="rightcol" category="Community,Dojos,Equipment" />
You will need to play around with the stylesheet to get everything perfect, but this should be a good start.
Last edited by Manfre (2004-07-05 05:13:16)
Offline
Re: mem_glinklist: Grouped Link List
Let’s say I have a list of categories on my main page, is there a way to pass which category was selected to the plugin to display a context-aware list of links? This combined with some way to do a category_list of link categories is what I am looking for I guess…
Thanks for the help.
Last edited by tkn (2004-07-05 15:51:51)
Offline
Re: mem_glinklist: Grouped Link List
You can pass categories to the plugin by specifying lc=_category_ in the url query string. E.g. http://mysite.com/?lc=Blogs is functionally the same as putting in the plugin tag and specifying category=“Blogs”. If a category is specified in the plugin, then it will use that value.
To get the category_list, you could create a link category and then add links to it for each category that you would like to have in the list. This method allows you to restrict and order the categories however you like. I use this concept on my site for the Internal links in the nav box.
I will also extend my plugin so it can list the link categories, but I’m not sure when I can get to this (end of next week the latest).
Offline
Re: mem_glinklist: Grouped Link List
I would really like this plugin if I could figure out how to get it output as lists and not divs. How would I go about getting this to work?
Offline
Re: mem_glinklist: Grouped Link List
This plugin uses forms to determine the output of each individual link, so check the form specified. If a form is not listed in the tag, then it will use “plainlinks” as the default.
Offline
#42 2004-07-08 19:20:15
- xenlab
- Member
- From: winter park, fl
- Registered: 2004-07-08
- Posts: 16
Re: mem_glinklist: Grouped Link List
awesome plug-in – thanks again!
thanks,
xenlab
http://www.xnlb.com/
Offline
#43 2004-07-13 05:33:16
- nardo
- Member
- From: tuvalahiti
- Registered: 2004-04-22
- Posts: 743
Re: mem_glinklist: Grouped Link List
nice work, Manfre… I got it working; now I’d like to request something which may not be in the scope of this plugin… but would be useful for link lists
first off, see: http://www.laidbak.net/phpsample/columnsplit/
the idea is to count the number of link CATEGORIES, and split them roughly evenly into columns (essentially divs, to be floated)…
e.g. user specifies linkcols=“3” and plugin outputs as usual, but now wrapped in 3 divs, tagged with classname_col1, classname_col2, etc
I know you could use CSS & float every link – but then you’d get:
a b c
d e f
instead of
a c e
b d f
and then u can’t keep the category title with the category links
what do u reckon?
Offline
Re: mem_glinklist: Grouped Link List
nardo, that’s an interesting idea. Are you looking to have the following output? Where “a b c”, “d e”, “m n o”, “p q r”, “s t u” are wrapped with a specified tag and auto set to have something like class=“myclass_coln”
CAT1
a d
b e
c
CAT2
m p s
n q t
o r u
I think using divs would get quite fugly and difficult to work—I could be wrong. I will look in to this more. Do you have any objections to the output being placed in to a table?
Offline
#45 2004-07-13 13:56:34
- nardo
- Member
- From: tuvalahiti
- Registered: 2004-04-22
- Posts: 743
Re: mem_glinklist: Grouped Link List
first question… probably simpler than that, it’s just carving the output into n columns, e.g.
CAT1 | CAT3 | CAT5 |
link | link | link |
link | link | link |
link | link | link |
CAT2 | CAT4 | |
link | link | |
link | link | |
link | link |
each of those columns is a div called myclass_coln — and they’re floated so they stack up left to right (or position them absolutely, etc)
re: tables, that could be okay too
Last edited by nardo (2004-07-13 14:05:47)
Offline
Re: mem_glinklist: Grouped Link List
What you are looking to do is already possible with this plugin. Each category list is wrapped and marked with a class, and all of these are wrapped and marked with a class. This allows you to specify a height for the outer wrapping that forces columns. Then you specify a width for the category wrapping so that the columns line up. I realize that you can’t specifically control the number of columns (unless you know the number of links for each category), but you can play with the CSS to get what you desire.
I may still implement both category based columns (example in your last entry) and link based columns (my previous example). It is all dependent upon free time, which I am severely lacking.
Offline
#47 2004-07-14 00:11:46
- nardo
- Member
- From: tuvalahiti
- Registered: 2004-04-22
- Posts: 743
Re: mem_glinklist: Grouped Link List
cheers Manfre
I have done what you suggest (shoulda thought of that earlier but I couldn’t – as the bishop said to the adult movie star – see the wood for the trees)
<code>
div.classname_list {
width:230px;
float:left;
}
</code>
which gives me three columns on my page… but with the same drawbacks as floating every link, i.e.
- alphabetical sort across, rather than down, the page
- some categories have 1 or 2 links, others have many… so some large empty spaces on the page, as each “row height” is defined by the tallest block
but it’s cool for now, no animals are being harmed, or countries laid waste as a result
thanks again for the plugin and your time
Last edited by nardo (2004-07-14 00:12:02)
Offline
Re: mem_glinklist: Grouped Link List
And the penny just dropped! Thank you.
This is just what I was looking for. I Just couldn’t understand how to link to a single category of links until now.
Please be patient! It may take me a while to climb the learning curve.
Offline