By emackn on
Can [view: ... ] be used in custom content types?
For some reason, when I call [view:myviewname] from a built-in Drupal page, the view is embedded. But the same call in the body of a custom content type (CCK) outputs the text "[view:myviewname]".
I configured the filtered and full HTML input formats to allow view insert markup, but nothing seems to work.
Am I missing something or is this a bug?
Comments
Limitations
Insert views doesn't work with custom-themed CCK fields. It's an unfortunate consequence of 1) the fact that insert_view can't use the normal filter mechanism because its contents can't be cached, and 2) the fact that custom-theming a CCK node (or using contemplate.module) causes the $node->body field to be ignored.
The same problem occurs using inline.module, upload.module, freelinking.module, or any other module that does its work in nodeapi($op == 'view'). I consider it a limitation of CCK at the present time.
Using straight PHP to load and print the view in the themed CCK node is the best solution right now.
--
Eaton's blog | VotingAPI discussion
--
Eaton — Partner at Autogram
Hi, any chance of a pointer
Hi, any chance of a pointer on how best:
"Using straight PHP to load and print the view in the themed CCK node is the best solution right now."
Can be acheived?
Many thanks.