Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
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
#49 2004-07-29 05:46:18
- nardo
- Member

- From: tuvalahiti
- Registered: 2004-04-22
- Posts: 743
Re: mem_glinklist: Grouped Link List
> Manfre wrote:
> 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.
how’s your schedule going? : )
Offline
Re: mem_glinklist: Grouped Link List
Been busy with other ventures that put food on the table. I’ll try to do some work on this next week, but I can’t promise anything.
Offline
Re: mem_glinklist: Grouped Link List
Weird… the plugin doesn’t seem to work, I’ve no output at all, and errors if I activate error reporting :
Notice: Undefined variable: category in /home/ludys/www/textpattern_g119/textpattern/publish.php(765) : eval()’d code on line 408
Notice: Undefined variable: limit in /home/ludys/www/textpattern_g119/textpattern/publish.php(765) : eval()’d code on line 430
I’ve simply tested a simple <code><txp:mem_glinklist /></code> in a page. I’m using TXP gamma 119. The plugin is labeled as 0.3.
Offline
Re: mem_glinklist: Grouped Link List
Try this…
<txp:mem_glinklist category="" />
Last edited by Manfre (2004-08-19 01:54:40)
Offline
Re: mem_glinklist: Grouped Link List
> Manfre wrote:
> Try this…
<txp:mem_glinklist category="" />
Only one error now: <code>Notice: Undefined variable: limit in /home/ludys/www/textpattern_g119/textpattern/publish.php(765) : eval()’d code on line 610</code>
Edit: Ouch, argh to wake up. Ok with limit=”“ no error, it worked.
Last edited by Jeremie (2004-08-19 08:59:19)
Offline
Re: mem_glinklist: Grouped Link List
I had to make two edits to stop apache/php from printing warning messages:
<pre>
if (!isset($limit) || !is_numeric($limit)) {
…
if (!empty($category)) {
$categories = ‘’;
</pre>
Works great! If I had a wish it would be for text titles to use instead of the catagory names which aren’t always designed for headings/printing. Maybe “catagory(Human Readable)”?
Offline
Re: mem_glinklist: Grouped Link List
This plugin is working very well for me. It was exactly what we needed. Thanks, Manfre!
I have one concern. The page I’m referencing is Entropy – Links. I’d like to keep the categories in unordered lists. My form is set up to wrap each link in li tags. I am using listwraptag=“ul”, which works, but it also puts the Category name, which is a h4, inside the ul without being inside of an li. This does not validate (the page is XHTML 1.1). I can wrap the category name with headwraptag=“li”, which does validate, but doesn’t give the document the structure it needs—both semantically and stylistically…it doesn’t look like a headline.
Basically what I need is one of two things. To be able to wrap just the links—not the corresponding category—in a tag, specifically, “ul.” Barring that, I need to be able to wrap my category names in two tags, first “li” and then “h4.”
Any ideas? Hope that made sense.
MT
Offline
Re: mem_glinklist: Grouped Link List
It’s been a while, but i’m starting to get back in to coding for textpattern. I updated to 0.4.1 which primarily silences the apache warnings. Thanks \b\b
I’ll look in to the other requested features as time permits.
Offline
Re: mem_glinklist: Grouped Link List
> Manfre wrote:
> Wilson, you are missing a piece. This is designed with the goal of listing multiple categories with their headers in a way that keeps each list separate, but grouped together. I could push it up a level and add another wrapper to surround the header and the list.
I think this plug-in will be totally perfect when the xhtml list output be this:
<code>
<div>
<!— or the selected tag to wrap one category link list —>
<h4>category name</h4>
<!— or the selected tag to wrap one category name —>
<ul>
<!— or the selected tag to wrap the links list —>
<li>link 1</li>
<!— or the selected form to output link —>
<li>link 2</li>
<li>link 3</li>
</ul>
</div>
</code>
There is no need for a “wraptag” attribute that wraps all the mem_glinklist output code.
This all-wraptag can be added directly to the page-template, wrapping the <txp:mem_glinklist />
Example:
<code>
<div class=“my_glinklist_class”>
<txp:mem_glinklist />
</div>
</code>
And with this, there is no-need to do all the myclass_head, myclass_list stuff, cause you can write a CSS rule that applies to all tags under de all-wraptag.
Unfortunally, I dont know PHP…
well… hope my ideas could be contemplated for future releases of this great plug-in
Last edited by maniqui (2004-10-15 05:04:41)
Offline
Re: mem_glinklist: Grouped Link List
And another problem, similar to what Wilson describes:
<code>
<ul>
<h1>categoy name</h1>
<li>link 1</li>
<li>link 2</li>
<li>link 3</li>
</ul>
</code>
(this is an example of the output code if I use a “listwraptag” attribute with “ul” value, and “headwraptag” attribute with “h1” value)
This kind of code doesnt validate, al least in XHML 1.0 strict.
Offline
Re: mem_glinklist: Grouped Link List
maniqui, that is a good way of doing things. I think i’ll have the wrap code follow that model in the next release.
Offline
Re: mem_glinklist: Grouped Link List
What maniqui described is exactly what I had mentioned happening on my own site as well. Following his suggestions for the wraps would make this plugin totally perfect.
Offline