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.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

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

Checking for a dataobject that exists

Go to End

9 Posts   4906 Views


Community Member, 165 Posts

3 November 2009 at 2:03am

That's fine, not too bothered about the 'hackyness' atleast it works!

Had to tweak it though, this is crrect line of code

if($this->Title != "New Page" && !DataObject::get_one('Group', "Title = '$this->Title'")){

Really happy that this works now. My main problem is that I am primarily a designer, not really a developer and I think I fall down with knowing the correct syntax. I've never used Saphire before, any recommended resources out there for this stuff?

Thanks again for your help, I'm on the right road now.

PS looking forward to the SS book arriving this week, good stuff

Go to Top