-
- 80 Posts
I'm working on a function that fetches a resource object and re-orders its content for output to print. Basically, there is a tv (that holds a special rich-text content area) wrapped in a chunk; that chunk is placed somewhere in the flow of the main content by the user and floats within the main content. For printing purposes, the content in this chunk needs to be taken out of the flow of the main content. Thus I need to get the main content without chunks being parsed already. getContent() or $res->get('content') fetches semi-raw content (chunks are still processed). Is there a built-in way to easily get truly raw content?
-
- 24,544 Posts
I think you might be confused. Either $res->get('content') or (better) $res->getContent() should get you the raw content. If you try to view that content, however, MODX will process the tags before showing it to you.
Try writing it to a file or doing this to it before viewing:
$ct = str_replace('[[', '[ [', $ct;
That will disable the tags so MODX won't process them.