Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

Data Model Questions /

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

[Solved] Question about automatic & created


Go to End


3 Posts   786 Views

Avatar
Graphicator

Community Member, 62 Posts

22 September 2011 at 10:45pm

	public function Title(){
		$replace = $this->Title;
		$replace = str_replace(' ',' ',$replace);
		
		return $replace;
	}

I am trying to display titles without being split.

What I get however, is the actual   showing up and not turned to html.

Avatar
Graphicator

Community Member, 62 Posts

23 September 2011 at 1:34am

$Title.RAW

Achieves the issue I was having

Avatar
Graphicator

Community Member, 62 Posts

23 September 2011 at 4:16pm

Edited: 23/09/2011 4:20pm

I'm taking down the [Solved] on the title, because this function produces quite a mess everywhere. In the backend, I still see "ampnbs" everywhere because I cannot program in {Title.RAW} everywhere the DataObject column shows up.

However....

I just switch the function to

public function Title2RAW(){...

and in the calling page

$Title2RAW.RAW

Cheers!