We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

Linklist Module v1.2.1 beta

Development and Programming

Yoshi's avatar
Yoshi
39 posts
19 years ago
Yoshi's avatar Yoshi

The original concept was that members to your site could store their own linklists ala blogrolling. it was something that was thrown around when first starting the linklist. it got put onto the backburner, mainly because the resources that it could possibly take up on your site should you ever decide to offer it to just any member. More thought has to be put into it really, the pros and cons of having such a thing.

But that’s the whole idea. Of course, the idea that having member linklists has always been an iffy thing.

of course, this would include the module actually having something you would create a template for, such as mod:linklist:memberlinks or something like that. so members would never actually go into the control panel.

and yes, i am the yoshi in oly. 😊

       
Andru Edwards's avatar
Andru Edwards
331 posts
19 years ago
Andru Edwards's avatar Andru Edwards

RE: Olympia, I need to invite you to the next Seattle Mind Camp. Check out the site at www.seattlemind.com, or search technorati for mindcamp10 and mindcamp20 to see how it all goes down.

RE: LinkList. I am still having an issue where the linklist just won’t appear, even after adding dynamic=”off” to the tag. Here is an example:

www.gearlive.com

On the left, you will see a section titled “Links” where the link list is displayed. Now, try clicking on a category or permalink. The links disappear, even though I am using the exact same syntax :(

       
Yoshi's avatar
Yoshi
39 posts
19 years ago
Yoshi's avatar Yoshi

hmm. your best bet is to post the linklist code that you’re using on the categories page, then I can dissect it. 😊

       
Andru Edwards's avatar
Andru Edwards
331 posts
19 years ago
Andru Edwards's avatar Andru Edwards

Here you go:

<div class="box">
<div class="sidebartitle">Links</div>
{exp:linklist:entries linklist="glmedia" orderby="url_title" sort="ASC" status="open" dynamic="off"}
<a href="http://{linklist:url}">{linklist:url_title}</a>

{/exp:linklist:entries}
</div> <!--close box-->

And the code I am using on the main page:

<div class="box">
<div class="sidebartitle">Links</div>
{exp:linklist:entries linklist="glmedia" orderby="url_title" sort="ASC" status="open"}
<a href="http://{linklist:url}">{linklist:url_title}</a>

{/exp:linklist:entries}
</div> <!--close box-->

Only difference is dynamic=”off”. However, I have tried removing that from the category and permalink pages, but it still doesn’t work.

       
Yoshi's avatar
Yoshi
39 posts
19 years ago
Yoshi's avatar Yoshi

Hmm are you caching your templates? that might cause some craziness. Another thing i’ve noticed too with templates is with saving them as files. if you save templates as files, they can get flaky there as well if you don’t have your template directory set to an absolute path. I’ve had many problems with that as well.

But honestly, i don’t see a reason why the linklist would not be displaying anything unless there’s an error somewhere on that page that is causing it, although I’d have to wonder what that would be.

       
John Henry Donovan's avatar
John Henry Donovan
12,339 posts
19 years ago
John Henry Donovan's avatar John Henry Donovan

Browsing the Gearbox site I can’t replicate the problem.

       
Yoshi's avatar
Yoshi
39 posts
19 years ago
Yoshi's avatar Yoshi

Hmm, browsing now, yes, it appears that the links underneath the links section look like they’re coming up.

Something change?

       
msteinruck's avatar
msteinruck
27 posts
19 years ago
msteinruck's avatar msteinruck

Does anyone know if it’s possible to write a conditional using the LinkList plugin to add a class to the LI for dynamic highlighting? Here’s my code where segname is a dynamic variable created at the top of the template:

<ul id="subnav">
{exp:linklist:entries linklist="aboutNav" orderby="linklist_id" sort="ASC" status="open"}
<li {if segname == {linklist:url}}class="active"{/if}><a href="http://{linklist:url}">{linklist:url_title}</a></li>
{/exp:linklist:entries}
</ul>

This just returns all of the link items with a class=”active”.

       
Yoshi's avatar
Yoshi
39 posts
19 years ago
Yoshi's avatar Yoshi

what exactly are you checking for? In your code, what is segname? What are you trying to dynamic highlight in your example, i’m just kinda confused.

       
msteinruck's avatar
msteinruck
27 posts
19 years ago
msteinruck's avatar msteinruck

Sorry, I should have been more clear. This is the subnavigation in the left sidebar and I’m trying to highlight the navigation item of the page that the user is currently on. So, for example, if I’m on the “Our Mission” page, I want the “Our Mission” navigation link to be highlighted by having class=”active” to the LI.

The value of segname is checking the URL string:

{assign_variable:segname="/{segment_1}/{segment_2}"}

I was trying to use that to match the {linklist:url}, but it doesn’t seem to be working despite the fact that I can get values for both segname and linklist:url to print out separate from the {if} statement.

I understand that checking for the URL string is probably the totally wrong way to go, but I just can’t think of anything else to check against. Any help would be greatly appreciated.

       
Yoshi's avatar
Yoshi
39 posts
19 years ago
Yoshi's avatar Yoshi

Ok, I think I understand now. I think seeing this in action may be the first step to figuring it out. I’m guessning that you’re using the linklist for navigating within your own site? instead of external links?

       
Yoshi's avatar
Yoshi
39 posts
19 years ago
Yoshi's avatar Yoshi

Actually now that I think about it, yeah, that won’t work because of the way conditionals are parsed in linklist. I’d have to do some testing on my dev server and see why it comes up as true all the time, but I’m thinking you’ll need an alternative way to displaying that.

But still, seeing it in action would be good too. 😊

       
msteinruck's avatar
msteinruck
27 posts
19 years ago
msteinruck's avatar msteinruck

You’re correct, I am navigating within my own site. It works great so far except for this highlighting issue. I just can’t show you the page in action because I’m building it locally to test it first. Sorry.

       
Yoshi's avatar
Yoshi
39 posts
19 years ago
Yoshi's avatar Yoshi

Ok, that’s no problem. Then i’m pretty sure I know why it’s doing it, let me fuss with the code a little bit and i’ll tell you exactly what we can do. 😊

       
Yoshi's avatar
Yoshi
39 posts
19 years ago
Yoshi's avatar Yoshi

Whew, let’s talk about craziness. Well, here’s a hack for you, there are just a few conditions. (no pun intended there.)

When you code the template, in your situation, you need to format it thusly:

{if {linklist:url} == "{segname}" }
...
{/if}

Notice two things: the linklist:url is on the left hand side of the conditional. it needs to be this way to work.

Also notice the quotes around segname. This must be there. otherwise you’ll get nothing or a big old fat PHP error if you’ve got it set to view those.

Just plug this haxored mod.linklist.php.txt into your modules/linklist directory, and change your code, and cross your fingers. don’t forget to get rid of the .txt on the end of the file so it’s just .php.

Oh, and please let me know if this hack worked. This is a temporary fix. Obviously I need to rewrite conditionals in a future release. /sigh 2.0…

       
1 2 3

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.