633 Posts in 170 Topics by 237 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 1238 Views |
-
Returning Feed Data as HTMLText

13 January 2009 at 5:09pm
I have modified the CNN News reader to read my client's blog. However, I would like to return the description as HTML Text. So what happens, is I read the blog, loop through the RSS feed and create an output array just like the CNN Widget. But in my template, I want to be able to take advantage of the methods available for HTMLText object types. Is there anyway to do the following, but return one of the elements as HTMLText:
$output->push(
new ArrayData(
array(
"Title" => $title,
"URL" => $link,
"Body" => $description
)
)
);I went through just about all the widgets examples and I do not see anything that leads me to believe this is possible, but the widget examples aren't exactly pushing the edge of the envelope either. Any help would be appreciated.
Thanks!
-
Re: Returning Feed Data as HTMLText

27 January 2009 at 10:52am Last edited: 27 January 2009 10:52am
Perhaps something like this could work:
$obj = new HTMLText("Body");
$obj->setValue($description);$output->push(
new ArrayData(
array(
"Title" => $title,
"URL" => $link,
"Body" => $obj
)
)
);Now Body is of the type HTMLText and can use the methods of it?
Just a guess, haven't tried this myself, but something like this could work
-
Re: Returning Feed Data as HTMLText

27 January 2009 at 7:02pm Last edited: 27 January 2009 7:04pm
Instead of $description, try using $ParsedContent.
Not sure if that's what you're looking for, but it worked for me with local blog entries.
(To clarify, I used $ParsedContent in the template.)
| 1238 Views | ||
|
Page:
1
|
Go to Top |


