# Parameter Won't Render

**URL:** <https://discourse.gohugo.io/t/parameter-wont-render/40809>\
**Category:** support\
**Created:** [October 4, 2022, 2:59pm UTC](https://discourse.gohugo.io/t/parameter-wont-render/40809 "2022-10-04T14:59:54Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jim\_Homme](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/jim_homme/32/17329_2.png) [@Jim\_Homme](https://discourse.gohugo.io/u/Jim_Homme)\
**Post date:** [October 4, 2022, 2:59pm UTC](https://discourse.gohugo.io/t/parameter-wont-render/40809/1 "2022-10-04T14:59:54Z")

</div>

Hi,  
I want to render an iframe on one page. In my front matter, I have this:

```auto
puzzle= '<iframe title="LiChess Daily Puzzle" src="https://lichess.org/training/frame?theme=brown&bg=dark" style="width: 400px; height: 444px;" allowtransparency="true" frameborder="1"></iframe>'

```

In the body of my markdown file I have this:

```auto
{{ .Params.puzzle }}

```

In stead of the iFrame, when I type `hugo server` to test the page, the content in the double braces appears on my page. I have to be missing something very basic and obvious. What is it?

Thanks so much. I’ve done reading about shortcodes and I have not gotten that to work either. Instead of embedding the page, I see a link inside the iframe. The above was the latest attempt.

---

<div class="post-metadata">

**Author:** ![jmooring](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/jmooring/32/4214_2.png) [@jmooring](https://discourse.gohugo.io/u/jmooring)\
**Post date:** [October 4, 2022, 3:04pm UTC](https://discourse.gohugo.io/t/parameter-wont-render/40809/2 "2022-10-04T15:04:54Z")

</div>

You cannot place template code in content. Use a shortcode instead.

---

<div class="post-metadata">

**Author:** ![Jim\_Homme](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/jim_homme/32/17329_2.png) [@Jim\_Homme](https://discourse.gohugo.io/u/Jim_Homme)\
**Post date:** [October 4, 2022, 3:22pm UTC](https://discourse.gohugo.io/t/parameter-wont-render/40809/3 "2022-10-04T15:22:51Z")

</div>

Hi Joe,

Thank you so much for the quick reply. I also tried using a shortcode. When I did, instead of the page rendering in the iframe, a link to the page rendered in the iframe.

In my markdown file, I call the shortcode like this.

```nohighlight
{{< daily-puzzle >}}

```

Here is my shortcode file.

```nohighlight
<iframe title="LiChess Daily Puzzle" src="[https://lichess.org/training/frame?theme=brown&bg=dark](https://lichess.org/training/frame?theme=brown&bg=dark)" style="width: 400px; height: 444px;" allowtransparency="true" frameborder="0"></iframe>

```

I’ve been playing around with my configuration file because I was reading about getting the markdown to render. I have some commented out parameters, because I’m still trying to understand how that works. Here is the commented out code.

```nohighlight
# [markup.goldmark.renderer]
# html.withunsafe=true
# unsafe = true
# xhtml = true

```

Thanks for everything.

Jim

---

<div class="post-metadata">

**Author:** ![jmooring](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/jmooring/32/4214_2.png) [@jmooring](https://discourse.gohugo.io/u/jmooring)\
**Post date:** [October 4, 2022, 3:27pm UTC](https://discourse.gohugo.io/t/parameter-wont-render/40809/4 "2022-10-04T15:27:09Z")

</div>

content/post/test.md

```auto
+++
title = 'Test'
date = 2021-01-01T00:00:00-00:00
draft = false
[puzzle]
title = 'LiChess Daily Puzzle'
src = 'https://lichess.org/training/frame?theme=brown&bg=dark'
+++

{{< daily-puzzle >}}

```

layouts/shortcodes/daily-puzzle.html

```auto
<iframe
  title="{{ .Page.Params.puzzle.title }}"
  src="{{ .Page.Params.puzzle.src }}"
  style="width: 400px; height: 444px;"
  allowtransparency="true"
  frameborder="1">
</iframe>

```

Or parameterize the shortcode instead of setting front matter…

markdown

```nohighlight
{{< daily-puzzle title="LiChess Daily Puzzle" src="https://lichess.org/training/frame?theme=brown&bg=dark" >}}

```

layouts/shortcodes/daily-puzzle.html

```auto
<iframe
  title="{{ .Get "title" }}"
  src="{{ .Get "src" }}"
  style="width: 400px; height: 444px;"
  allowtransparency="true"
  frameborder="1">
</iframe>

```

---

<div class="post-metadata">

**Author:** ![Jim\_Homme](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/jim_homme/32/17329_2.png) [@Jim\_Homme](https://discourse.gohugo.io/u/Jim_Homme)\
**Post date:** [October 4, 2022, 4:53pm UTC](https://discourse.gohugo.io/t/parameter-wont-render/40809/5 "2022-10-04T16:53:59Z")

</div>

Hi,  
Thank you for the code. I understand it now. I’m sorry to have to write this reply.

When I implemented it, my page showed an iframe with a link to the page. I expected to see the actual page. Am I misunderstanding what’s supposed to happen, or is there possibly a configuration paramater I need to add or change that wouldmake my site show the page?

---

<div class="post-metadata">

**Author:** ![jmooring](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/jmooring/32/4214_2.png) [@jmooring](https://discourse.gohugo.io/u/jmooring)\
**Post date:** [October 4, 2022, 4:57pm UTC](https://discourse.gohugo.io/t/parameter-wont-render/40809/6 "2022-10-04T16:57:52Z")

</div>

Without looking at your project repository, I would just be guessing.

Here’s a working example:

```bash
git clone --single-branch -b hugo-forum-topic-40809 https://github.com/jmooring/hugo-testing hugo-forum-topic-40809
cd hugo-forum-topic-40809
hugo server

```
