Is it possible to insert some kind of text block with links in node edit form?
Let's say I have "press-release" node type, all my users have rights to add press-release. On the top of my node/add/press-release page I want to place a text block with all rules and restrictions with links to certain help pages.
Is is possible?
Thanks.
Comments
Comment #1
markus_petrux commentedYes, you can. For example:
1) Implement hook_form_alter() to insert a #markup element with the contents you wish.
2) Implement hook_content_extra_fields() to allow you to move this element to the top of the form in "Manage fields" screen.
Another option:
Search for markup module.
Comment #2
Equ commentedNice, thank you!
Comment #4
nonzero commentedWhere is the best place to add these hooks? Forgive my ignorance, but I assumed I would have to add it to a custom module, which I think is overkill. My next idea was to add page-node-add-some_type.tpl.php (change "some_type") to the theme folder, but I feel that's too much also because a lot of the markup is duplicated from page.tpl.php.
My current solution is to use THEME_preprocess_page in template.php add add help text from another node:
Any better ideas?
Comment #5
markus_petrux commentedRe: Any better ideas?
Nope. If it works, then that's fine too.