It's all in the title I guess.
1- Support of views displays : It's a pity to not be able to use the displays offered by views 2 and having to stick with the default display of each view we want to use for selecting relatedcontent, or worse, having to duplicate a view so that we can use the display x of another view. I decided to make some changes in the module to be able to do so.
What I did is changing the way to select the views in the content type edit page. Instead of checking the views we want to use from a "long" table (depends on the number of views available), we select the view we want, it's display (through a hierarchical select) and then add it to the table. It's all in the patch.
2- Support of tpl files : Depending on the theme I saw in the theme file, relatedcontent.tpl.php was no longer used to help theming the relatedcontent. It's also fixed in this patch.
Now we can use the tpl file again, but not only that. we can also have a per node type relatedcontent template file by using relatedcontent-node_type.tpl.php.
Also, if we chose the grouping option (by type, author or view), we can use the relatedcontent-group.tpl.php file to render groups and relatedcontent-group-group_id.tpl.php or relatedcontent-node_type-group-group_id.tpl.php. I guess it's cleaner to do it that way instead of stacking conditions in one tpl file.
Hope it would be useful.
| Comment | File | Size | Author |
|---|---|---|---|
| relatedcontent.patch | 53.92 KB | amelfe |
Comments
Comment #1
scothiam commentedThanks for the patch amelfe, but I'm a bit confused. I see no way to add views as you mentioned... there is an 'add' button, but it does nothing... maybe I'm missing something?