I am desperately trying to embed a linodef tag using WYSIWYG TinyMCE button and I cannot get it to format correctly. The final tag I want in the editor is:
[#view_name,type="view",display="block_1",arguments="node_id"]
In my case this is:
[#emb_audio,type="view",display="block_1",arguments="188"]
When the custom TinyMCE button is clicked I would like it to show a list of all audio nodes (selected by view or node type; whichever is easier). When the user selects one it inserts the tag mentioned above and passes the argument node_id (in this example - 188).
Is this possible?
I have tried creating various taglists but can only pass the node id 188 as a hard coded argument.
Any help would be greatly appreciated.
Comments
Comment #1
tinker CreditAttribution: tinker commentedI managed to get this to work by hacking the taglist.load.inc but I don't like hacking modules so I would like to request this as a feature and possibly help in developing it if you like. The current module is so close to working that it hurts and I think it would provide the missing link in embedding inline content.
Functionality
Let me start by describing the scenario for use.
New Features
Like I said I have this working by hacking two lines of code but I would like to see this as an option in the Taglist Wizard. Here is what I propose:
On the Taglist Options & Properties page add a new fieldset "Tag format" which contains:
Benefits
I think this could revolutionize inline content filters for Drupal. It could provide better functionality for embedding content than all of the following modules: Inline, Image Assist, Audio Assist, Rep[lacement]Tags, and TinyMCE Node Picker.
My temporary hack
Please let me know if this is possible and if there is anything I could do to help in adding this functionality to the module.
Comment #2
Roi Danton CreditAttribution: Roi Danton commentedThanks for your proposal and I'd like to discuss this further! Especially since the way taglists handles views is quite basic as it is now. Maybe when developing your solution we will detect some ways to solve #692520: Use rendered output of views, too. Currently I'm short on time for development but I'll try to answer your questions asap. The fieldset "Tag format" should be added in includes/admin.inc
linodef_taglists_wizard_options_form
.Just one question: Why you've chosen to use a view with argument to embed the CCK field instead of the fieldname directly: [#nid,content="field_name"]. It is because filefield doesn't work yet properly with taglists: #703194: Add file/image/reference field support for taglists? Or is it primarily because you want to display the node (titles) in the taglists and not the field content itself?
Comment #3
Pepe Roni CreditAttribution: Pepe Roni commentedI think, it could be the other way: #692520: Use rendered output of views will also be able to solve this issue :)
Comment #4
tinker CreditAttribution: tinker commentedYes I think that my request is similar to #69250. I am using the view with argument because I wish to see a fully rendered block that contains multiple fields. In my case is the content title linked to node and a MP3 file with embedded player.
Thanks for letting me know which file to look at. I will check it out and maybe create a patch if I understand it.