[Resolved] What happened to x random blog links?
Okay I have figured this out, but I think the new system for doing this is a step away from what wordpress is about.
Previously everything could be defined via the admin ui and then simply call ‘get_links_list’.. all randomness, all limits.. etc.. everything was controlled via the admin control panel.
Now in order to get the same effect I have to edit the template and add a series of ‘wp_list_bookmarks’ with special instructions for each link category ID I want to list.
This is a mistake and steps away from the ability to customize everything via a centralized UI (the admin control area).
Just my two cents.. I’m sure no one cares.
No, we care, but in the other direction. The UI for showing blogroll links was fundamentally broken, because 95% of the themes out there had to include their own SQL code to display links in the way they wanted them to. This generally meant that every upgrade caused a broken blog in some way.
wp_list_bookmarks is an attempt to move the control over the display back to where it belongs, in the theme. The theme is the presentation layer, it should determine how things are presented.
Now, sidebars are moving more toward being widget oriented, and additions are being made to let the “Links” sidebar (which uses wp_list_bookmarks) be more configurable. In the long run, your UI will have simply moved from the blogroll page onto the sidebar widgets page (under presentation).
But the transition requires time, because themes have to adjust to the new parameters and such.
Interesting.. I thought the whole purpose of having multiple themes is the ability to have one single and simple command that can have the output styled however you want, but the command itself never changes.
The output of that command should be controlled via the admin pane, not the template.
If you have;
<span><? wp_list_bookmarks(); ?></span>
<div><? wp_list_bookmarks(); ?></span>
the wp_list_bookmarks(); output should be entire controlled via the admin control panel and this can easily be done..
Once you start forcing people to edit the templates suddenly the whole point of easily changable themes goes away..
You’re missing the long term view. The different parts of the output of that command needs to be controlled by *both* the admin panel and the theme.
The template/theme is the presentation layer. It controls everything that is displayed. That’s the idea here, if anything is displayed, then the theme is going to specify exactly how it’s displayed.
The problem with the previous blogroll functionality was that the admin panel specified things like before and after tags and title things and such. In other words, it controlled the display parameters. That’s not what it should be doing. HTML should not be something that you input on the administration screens. HTML is presentation, not content.
Widgets are the long term solution. The theme controls some parameters of how widgets display (before and after titles, before and after widgets, etc), but the widget itself can determine what the content it displays is. That’s the real problem here, separation of content from presentation. Widgets allow that to happen nicely, so that’s the long term goal.
But in the short term, the presentation needed to be removed from the admin screens, so that the themes could stop using dirty hacks to control the presentation themselves. Now, this does mean that the theme has control over the content to some degree with wp_list_bookmarks, but one step at a time, yeah?
See, you want to control the content. What categories it displays. What links it displays. How many of them. Etc. But how it actually displays them needs to fit in with the rest of the theme, and so it must be in the theme to do that. A widget is not in the theme, but it gets the “how” from the theme.
I guess the biggest issue I see is that I’m now forced to tell the blog roll that I specifically want link categoryID number 5 treated x way.. and 6 treaded y way..etc.. when I think that part of it should be handled via the admin panel.
I feel that NOW I have to use a dirty hack to make it work the way it worked before for me out of the box with a single command.
I will agree that the widgets will likely solve this issue as you can define that stuff in the widget.. And I realize this is probably the middle step before the final goodness, so I’ll stop complaining..
I understand what you’re saying, and I would agree with it, except for the fact that the “out of the box” way actually did not work on the majority of third party themes, due to the manual SQL they relied on to get the links. The large majority of themes did not use get_links_list because it did not fit that theme’s layout idea.
Hopefully smarter widgets will make it into 2.5. I’ve submitted a couple of patches, but some work still needs to be done along those lines. I’m thinking a single Bookmarks widget for somebody that wants to display all their links together, along with one separate widget for each Bookmarks category if you want to do what you’re talking about.
- The topic ‘[Resolved] What happened to x random blog links?’ is closed to new replies.