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've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

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

Error with global call


Go to End


732 Views

Avatar
steve_nyhof

Community Member, 224 Posts

17 March 2010 at 9:56am

I have been using this code for a long time without an issue. However, I have never used it in a global situation.

This seems to work fine
<% if PageFontType == 0 %>

And this works fine also
<% if callGlobal.GlFontTypes %>

But this gives me the error "Parse error: syntax error, unexpected '}'..."
<% if callGlobal.GlFontTypes == 0 %>

The function that call the global settings into the page

public function callGlobal(){
    return DataObject::get_one('PageGlobal');
    }

Any ideas of what I must do differently?

Thank you,
Steve Nyhof