Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#73 2004-11-07 19:38:30
- danielk
- Member
- Registered: 2004-03-04
- Posts: 24
Re: mem_glinklist: Grouped Link List
that’s part of it, yes. I would also like to specify where to start, initially. example:
- MainCatA
- SubCatA
- SubSubCatA
- SubSubCatB
- SubSubCatC
- SubSubCatD
- SubCatB
- SubCatA
- MainCatB
- SubSubCatA
- SubSubCatB
Feed it MainCatA as a starting point, and MainCatA and any children would be displayed as the menu. If root or nothing is specified to start, it would output the entire tree. If depth is specified, it will only display children to that depth. For depth of ‘1’, it would display the subcat’s, but not the subsubcat’s. As you navigate deeper, it will display children to the set depth from the subcat that you are in, but not the parents. With this many levels, it probably wouldnt be a bad idea to have a co-function that can output a crumb trail to keep track of where you are.
I’m trying to learn PHP, and I have a pretty good idea of what I want, but my PHP abilities are limited, so I dont know how to get there.
Offline
Re: mem_glinklist: Grouped Link List
I’m so glad I didn’t have to write this plugin myself, thanks! One question—can I override the wraptag attributes to not wrap any tags? I’m trying to recreate the side navigation on Ryancannon.com in textpattern. I use the tag <txp:mem_glinklist wraptag=“li” headerwraptag=”“ listwraptag=“ul” form=“ListItems” />, and I’m trying to get the following output:
&lt;li&gt;Header&lt;ul&gt;&lt;li&gt;Link1&lt;/li&gt;&lt;li&gt;Link2&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;
So far so good, but the Header gets wrapped in a div tag, looking like this:
&lt;li&gt;&lt;div&gt;Header&lt;/div&gt;&lt;ul&gt;&lt;li&gt;Link1&lt;/li&gt;&lt;li&gt;Link2&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;
The div is an unnecessary extra, so I’d like to remove it. Is that possible?
Last edited by ARCanine (2004-12-07 19:14:23)
Offline
Re: mem_glinklist: Grouped Link List
Sorry if this is an obvious question but is there a way to surpress the headwraptag output so that the generated code is something like:
<ul><li>Item one</li><li>Item two></li><li>Item three</li></ul>
… With no headwraptag?
OR… apply a class to the headwraptag:
<h2 class="things">THINGS!</h2>
Cheers
Offline
Re: mem_glinklist: Grouped Link List
To get rid of the head tag, then you should specify the attribute class=“listclass” within the plugin tag. This will cause the head to be wrapped with the class “listclass_head”. With that, you just have to add CSS to format as desired, or hide it with “display: none;”.
Hope that helps. Sorry for the very delayed updates. I’ve been busy.
Offline
Re: mem_glinklist: Grouped Link List
Version 0.7 is now released and all the download links have been updated.
I changed the way it works, so make sure you read the plug-in documentation (that is now all inclusive).
Some Major Changes:- new attribute “headless” which supresses the outputting of the category heading.
- added attribute to specify the desired number of columns. this will put the links with in a category in to n columns.
- the categories specified will maintain that order on the way out.
- added mem_redirect tag to create a single link pointing to /textpattern/link.php I published. mem_glinklist had the undocumented linkto=“1” attribute that would do this for list link tags.
- more alterations…read the docs…
Offline
#78 2005-01-10 14:35:15
- cojitza
- New Member
- From: Romania
- Registered: 2004-09-19
- Posts: 3
Re: mem_glinklist: Grouped Link List
Please help!
I installed the plugin, but…
Fatal error: Call to undefined function: latts() in /var/www/sites/www.standardeweb.org/beta/textpattern/publish.php(767) : eval()’d code on line 1030
I use
<txp:mem_glinklist limit=”“ category=”“ />
What is the problem??
Thankx
Last edited by cojitza (2005-01-10 14:35:43)
Offline
Re: mem_glinklist: Grouped Link List
> cojitza wrote:
Please help!
I installed the plugin, but…
Fatal error: Call to undefined function: latts() in /var/www/sites/www.standardeweb.org/beta/textpattern/publish.php(767) : eval()’d code on line 1030
I use
<txp:mem_glinklist limit=”“ category=”“ />
What is the problem??
Thankx
> end quote
Paste the below code to the end of ./textpattern/lib/txplib_misc.php, right above the ?>
<pre>
<code>
// ——————————————————————————————-
function gAtt(&$atts, $name, $default=NULL) { // trying this out as well
return isset($atts[$name]) ? $atts[$name] : $default;
}
// ——————————————————————————————-
function lAtts($pairs, $atts) { // trying this out as well
foreach($pairs as $name => $default) {
$out[$name] = gAtt($atts,$name,$default);
}
return ($out) ? $out : false;
}
</code>
</pre>
Offline
Re: mem_glinklist: Grouped Link List
> Manfre wrote:
> > cojitza wrote:
Please help!
I installed the plugin, but…
Fatal error: Call to undefined function: latts() in /var/www/sites/www.standardeweb.org/beta/textpattern/publish.php(767) : eval()’d code on line 1030
I use
<txp:mem_glinklist limit=”“ category=”“ />
What is the problem??
Thankx
> end quote
This should be fixed with ver 0.7.1. The missig method exists in 1.0rc2, but not rc1.
Offline
#81 2005-01-10 15:13:26
- cojitza
- New Member
- From: Romania
- Registered: 2004-09-19
- Posts: 3
Re: mem_glinklist: Grouped Link List
Thank for respons!
Now it gives me a blank page…
i use just
txp:mem_glinklist /
i’we try
txp:mem_glinklist categroy =”“ limit=”“ /
same thing :(
Last edited by cojitza (2005-01-10 15:14:24)
Offline
Re: mem_glinklist: Grouped Link List
try…
<code>
<txp:mem_glinklist category="CAT"><txp:link /><br /></txp:mem_glinklist>
</code>
…where CAT is the name of one of your link categories.
Last edited by Manfre (2005-01-10 15:22:19)
Offline
#83 2005-01-10 15:30:13
- cojitza
- New Member
- From: Romania
- Registered: 2004-09-19
- Posts: 3
Re: mem_glinklist: Grouped Link List
it works! Thankx!
How can i use for all my category? Without naming the category?
Offline
#84 2005-01-10 22:53:05
- Chris
- Member
- Registered: 2004-02-26
- Posts: 22
Re: mem_glinklist: Grouped Link List
Hi Manfre,
<strike>Could you post a link to version 0.5 for me. I’ve just updraded and things are now broken and I don’t have time to sort it out right now so I’d like to revert to 0.5. Unfortunately I didn’t keep a copy of the plugin.</strike> Scratch that, I have it under control.
Cheers, this is the most useful plugin I use by far!
Last edited by Chris (2005-01-10 22:59:17)
Offline