Question: I am trying reference things of type option in my Scala Play template. I've been trying to use this resource: <http://www.playframework.com/modules/scala-0.9/templates>

This is how I am trying to reference a field in the case class: 

```
@{optionalobject ?. field}

```

and it is not working, this is the error I am getting: 

```
';' expected but '.' found.

```

I am unsure why I am getting this error.

Answer: 
```
@optionalobject.map(o => o.field).getOrElse("default string if optionalobject is None")

```
Another possibility is using map, syntax I prefer for mixing up with HTML

```
@pagination.next.map { next =>
  <a href="@Routes.paginated(next)">
    @HtmlFormat.escape("Next >>>")
  </a>
}

```