Needs review
Project:
Custom Links
Version:
6.x-1.4
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Reporter:
Created:
21 Sep 2010 at 12:00 UTC
Updated:
21 Sep 2010 at 21:30 UTC
Jump to comment: Most recent file
right now function _custom_links_build_links returns ALL links for one node type. What would be cool, is if it could return particular set of links to be used in template, panel or anywhere for that matter.
in my particular use case I have 7 node types as group posts and 3 group nodes - for posts I want 'edit/delete/comment/promote(flag)' links and for groups I want 'create (insert one of 7 post types) content'.
module needs one more argument in function, array of links i want returned and one if statement to see if link prepared is one i want. Then I could call from template something like this
return _custom_links_build_links($node, $teaser, $block, array(
link_id_one,
link_id_two,
link_id_three,
));
and get links for particular node skipping ones I don't need in particular case.
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | custom_links-add_limit-918118.patch | 962 bytes | henrijs.seso |
Comments
Comment #1
henrijs.seso commentedhere is patch that adds possibility to limit links returned with and array of link_IDs. It will not brake existing code. It will allow to use custom links anywhere (template for example), not only in $links value of node object. You will be able to add 'edit' and 'delete' links under node body and some other set of links below title.
Comment #2
henrijs.seso commentedComment #3
henrijs.seso commented