Closed (fixed)
Project:
RelatedContent
Version:
5.x-1.6
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Reporter:
Created:
28 Jan 2008 at 17:06 UTC
Updated:
21 Feb 2008 at 10:51 UTC
Jump to comment: Most recent file
Now in the settings one can just choose to view Teasers or Full body.
It would be usefull to have an option to choose TITLES ONLY.
| Comment | File | Size | Author |
|---|---|---|---|
| #8 | RelatedContent-in-block.png | 10.94 KB | TBarregren |
Comments
Comment #1
mcreature commentedWas going to post the same request, Titles only would be very useful, so +1
Thanks for all your work on this Module.
Comment #2
dimepiece commentedremove user interface
Comment #3
dimepiece commentedremove user interface
Comment #4
dimepiece commentedremove user interface
Comment #5
TBarregren commentedFirst of all, this feature will be include in next version of RelatedContent, which I expect to start working on in March.
For those who are in hurry, there is a quite easy way to accomplish this already today. Take a look at the API provided by RelatedContent.
Following pseudo code shows one way to accomplished this:
Following pseudo code is a more "elegant" way to accomplish the same thing:
Please notice that the above code snippets are only pseudo code and hence will not work without further development.
The benefit with the later version, except from being more "elegant", is that
theme_titles()can be overridden in the template.php file, and make it, for instance, to read an titles.tpl.php file.It might seem strange that RelatedContent doesn't support titles already. It has a historical reason. I originally developed RelatedContent to be used in conjunction with Simplenews Template, also of mine, and Simplenews to assemble newsletter issues out of already existing nodes. Since this was done for a customer, it was initial developed to meet that particular customer's needs.
Comment #6
TBarregren commentedMore information is available in #218793.
Comment #7
j0hn-smith commentedI needed to display only the body so I've developed the first pseudo code example above into working code;
For title replace echo $nodeobject->body with echo $nodeobject->title.
You don't need the commented out part (between /* and */), I left it in so you can see all the possible attributes that you can choose to display. Set the nodes per page or block to 1 in the view before uncommenting the commented code or you will get the details of every related node the view returns (you don't have to do this but you'll see why if you don't).
Hope this is useful, I need this feature and it's taken me a while to get this far.
Comment #8
TBarregren commentedJust for the sake of demonstrating how the API of RelatedContent can be used to accomplish a block with links to related content, as seen in the attached image, I wrote following code snippet:
To use the code snippet, just cut'n'paste it into a block with PHP Input filter.
Comment #9
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.