I have looked around for a method for inserting a saved, fixed block of text in the body of a node. The concept is like this - I think it would be useful for consistency to have a way to choose a saved text block, say from a dropdown near the "body" section of a node, and have Drupal automatically insert this into the textarea. That way, for applications of Drupal where you are asking users to be consistent in their writing, it is a way of guiding them in that direction.
Could be for the sections of a book, or, a complex table you repeatedly use, etc.
Kind of like a "clipboard" Drupal has that you can pick what you want to paste in.
I thought it might be possible to use the textile filter as a base, and enter certain strings into the body to indicate that you want Drupal to insert something (kind of like you can do with some wiki macros.) For example:
{clipboard:Report-01}
... which when saved converts and is expanded out into:
<h1>TITLE</h1>
Dummy text, dummy text.
etc.
Is there a way to do this now, and if not, does anyone have any ideas on where to start?
Cheers,
Rick Cogley :: Tokyo, Japan
Comments
Adding a Node into a Node?
Re this, is there a way to add a Node into a Node? If so, I think a taxonomy tree just for boilerplate text could be made, and it might be relatively easy to grab the text from a different node and paste it in.
Any ideas are appreciated!
Rick Cogley :: rick.cogley@esolia.co.jp
Tokyo, Japan
A Concrete Example
Hello -
Here's a concrete example of where this would be really helpful.
If you use FlexiNode, and create a type "Checklist" which you intend to use for Quality Assurance during various processes you work within. Let's say you have one for "Weekly Server Check" and another for "Project Sanity Check", and, these have several attributes in common. However, the outline of the actual checklist, which you can indeed enter in as a default is very different per checklist.
Here is where it would be a great advantage to have a way to create a list of "snippets" of HTML which you can choose from a list and have inserted into a textbox. When I create content based on the node type "Checklists" I can simply choose from the dropdown that appears "Weekly Server Check" and it gives me a bunch of text that prompts me in the right direction for this activity. It also saves me from making a large number of flexinodes for each checklist I want to create.
Is this hugely difficult to implement in Drupal? I'm a Drupal and PHP beginner, so the module framework does not inherently make sense to me.
Could someone who knows the modules framework kindly give me a couple of comments on this?
Kind regards
Rick Cogley
Tokyo
Rick Cogley :: rick.cogley@esolia.co.jp
Tokyo, Japan
Snippets
This thing may help you: http://drupal.org/node/17574
Though it purpose is add snippets of code, but html texts also may be used well.
--
Axel,
JabberID: laika@jabber.org
Drupal in Russia