Since blocks can't take arguments, creating a CTools content type will allow people to easily add this to custom pages. If you are interested, I'll do the coding for this one for you. If not, I'll just add it to APK. I need to do it for my own site. Might as well share. :)
Michelle
Comments
Comment #1
q0rban commentedI'm not sure what you mean by 'blocks can't take arguments', but I think you might be referring to this? #621538: Switch to using Views to allow greater flexibility
Comment #2
michelleThere is no way to pass an argument into a block. So if the code of the block requires some external information, it needs to pull it. This isn't ideal for use in custom Pages because the information may not be where the block expects it to be. But writing a CTools content type allows it to make use of the context on the Page.
This would handle the issue you linked to, if the site used a custom Page to display blog posts.
I've already written the code and have it working on my site. I just need to know if you want to include it in Follow of if I should toss it into Advanced Profile Kit.
Michelle
Comment #3
q0rban commentedI'd be interested in seeing the code.. Do you think this is a better way of doing it rather than turning it into a view? The nice thing about using views is you could pull all sorts of other user data into the same block display.
Comment #4
michelleI don't see any benefit in making it a view but, then, I only need the simple block for my site.
This is the code for the content type:
I put it in APK for now. If you'd like to use it in Follow, do this:
Michelle
Comment #5
q0rban commentedWait, isn't this the same Michelle that wanted it to have 'Online Status' in there as well? ;)
I was thinking having it be a view might kill two birds with one stone, allowing you to add other components to the block that you may want as well as having it be visible on pages other than user/%
Thanks for pasting the code, I will mess around with this soon. :)
Comment #6
michelleHonestly, for my site, I really don't care about Online Status. But I plan to recommend this module for use with APK once the content type is settled into one of our modules and that's functionality that others have expressed interest in having.
As for making it a view, I really didn't look at that issue all that close. I'm doing 50 things at once and my only real issue is needing to get the block into a content type. :) A view is overkill for my simple needs but I don't think it's a bad idea if it helps others.
Michelle
Comment #7
q0rban commentedI'm going to set this to won't fix in favor of using Views.