3217 Posts in 853 Topics by 812 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 1088 Views |
-
Why Is Code Appearing In My Article Holder Summaries?

6 February 2009 at 3:41am
I'm not exactly sure if this is a new thing or not but some of my article holder pages are showing code in the summaries.
Example: http://wavs.unclebubby.com/actorsOthers are perfectly fine: http://wavs.unclebubby.com/comedy-c-d/
It seems that if there is code in that first paragraph, it shows up. My Spidey-Sense tells me it's because the summary field type can't handle HTML. Is there a way to either suppress the code in the summary or let it be interpreted?
Thanks,
Joe -
Re: Why Is Code Appearing In My Article Holder Summaries?

6 February 2009 at 3:55am
Make sure you cast your Summary field as HTMLText.
-
Re: Why Is Code Appearing In My Article Holder Summaries?

6 February 2009 at 8:04am
Would I need to do that in CSS, PHP or the .ss file?
-
Re: Why Is Code Appearing In My Article Holder Summaries?

10 February 2009 at 10:22am
In your ArticleHolder class make sure you have Summary, or whatever the name of the field is, cast as HTMLText.
static $db = array (
'Summary' => 'HTMLText'
); -
Re: Why Is Code Appearing In My Article Holder Summaries?

10 February 2009 at 11:39am Last edited: 10 February 2009 11:41am
The Articleholder.ss file refers to newsSummary but there is no corresponding reference in Articleholder.php nor Page.php which means it's coming from the core files, right? Since it's not a good idea to edit the core files, how/where should I insert what you suggest?
In Articleholder.php, if I change:class ArticleHolder extends Page {
static $db = array(
);
static $has_one = array(
);
toclass ArticleHolder extends Page {
static $db = array(
'newsSummary' => 'HTMLText'
);
static $has_one = array(
);
Will that accomplish the desired effect? -
Re: Why Is Code Appearing In My Article Holder Summaries?

16 February 2009 at 6:04am
(bump)
Still having the problem. Haven't tried anything because I can't figure out where to apply changes. Can someone walk me through it?
-
Re: Why Is Code Appearing In My Article Holder Summaries?

2 March 2009 at 8:53am Last edited: 2 March 2009 8:57am
bump again.
Can someone please tell me where/how, EXACTLY, I need to tell SS the news summary text is HTML? Or if that's not the way to do it tell me how to fix it?
I tried adding 'newsSummary' => 'HTMLText' to the ArticleHolder.php file but that didn't do a darn thing. Looking at ArticleHolder.ss, it directs the page to display $Content.FirstParagraph. Do I need to make some adjustment to $Content... wherever that is stored?
If you want to see an example, check out http://wavs.unclebubby.com/actors/
| 1088 Views | ||
|
Page:
1
|
Go to Top |

