I have the following code in one of my Play .scala.html templates:

```
@formats.map(format => {
  <div id="@format">
    {format}
  </div>
})

```

`formats` is a `Seq` of enumerations. The divs are created, with the proper "format" content (each contains a different format string), however, the ids are never set correctly. The id of each div is literally set to "@format", like this:

```
<div id="@format">
  OneOfTheFormats
</div>
<div id="@format">
  AnotherFormat
</div>

```

I've tried making the code `<div id="{format}">`, `<div id={format}>`, and `<div id=@format>` with no luck. It's odd, because I have done similar things in my other templates, but perhaps it's not working because of the special `map` case... maybe because `format` is a created argument, and not passed into the template?

**UPDATE:**

I tried the following, as someone below suggested:

```
@{
    def createDiv(f: String) = {
        <div id="@f">
            {f}
        </div>
    }

    formats.map(f => {
        createDiv(f.toString)
    })
}

```

Again, The formats are printed correctly *inside* the div, but the ID is never set. I'm beginning to think this isn't possible. I've also tried `<div id="@f">`, `<div id="{f}">`, and `<div id="@{f}">` with no luck. Oddly enough, in order to print the format inside the div, I have to use `{f}`, and not `@f`. Still struggling here...

**UPDATE 2:**

It works if I do the following: `<div id={f}>` ... no quotes! God damn.