Answers.Body: <p>Load the entries into a div then create several buttons to change the width of the div, or use JS to resize the div. Thus showing your users what happens to the responsiveness of the design at different widths. It doesn't need to be a iframe. Or just send them to a template with a UI element showing them to resize the browser.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-03-12T01:16:00.400Z
Answers.Text: OK I'll try out using just a div. I see most of the examples showing within an iframe but since I'm using the same css for examples I guess this makes sense.
Answers.UserDisplayName: julzmon
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-03-12T17:44:44.867Z
Answers.Text: Nope that doesn't work because the div will not trigger a media query only the browser window and I guess that's why it has to be contained in an iframe.
Answers.UserDisplayName: julzmon
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-03-12T21:46:16.523Z
Answers.Text: Then create route in the CP to a specific url. Output those entries in the specified template of that route. Then use the url of the route to load in your iframe.
Answers.UserDisplayName: a-am
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-03-17T16:11:37.537Z
Answers.Text: I'm not sure what you mean by "Then use the url of the route to load in your iframe." Could you please expand on that?
Answers.UserDisplayName: julzmon
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-03-17T19:35:24.067Z
Answers.Text: When you create a route in the CP you are creating a url to a page. A page with a specified template.
Answers.UserDisplayName: a-am
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-03-18T17:58:18.337Z
Answers.Text: Yes I understand what routes are but not sure I understand how to pass the url to the iframe.
Answers.UserDisplayName: julzmon
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-03-19T16:31:47.470Z
Answers.Text: Sorry, use the src tag for that route.  <iframe src='route/url'>   That will show load those items into the iframe.
Answers.UserDisplayName: a-am
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-03-11T17:26:38.837Z
Answers.LastActivityDate: 2015-03-11T17:26:38.837Z
Answers.UserDisplayName: a-am
Body: <p>I'm trying to showcase some responsive code and would like to create entries just with that code example. I would like them to appear in a template that has some js to resize an iframe and show responsiveness of the entry.</p>
  
  <p>Any thoughts on how I can accomplish this?</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-03-11T16:03:59.080Z
Comments.Text: I'm finding it a bit hard to understand what you're really asking here, or how its related to Craft specifically. Can you rephrase or perhaps give an example in pseudo-code of what you want to achieve?
Comments.UserDisplayName: Mats Mikkel Rummelhoff
Tags: <templating>
Title: How would I pass an entry URL to an iframe in a template?
ThreadText: # How would I pass an entry URL to an iframe in a template?
  
  (Asked by: username_0 on 2015-03-11)
  
  I'm trying to showcase some responsive code and would like to create entries just with that code example. I would like them to appear in a template that has some js to resize an iframe and show responsiveness of the entry.
  
  Any thoughts on how I can accomplish this?
  
  **Tags:** templating
  
  > **Comments:**
  > **username_1**: I'm finding it a bit hard to understand what you're really asking here, or how its related to Craft specifically. Can you rephrase or perhaps give an example in pseudo-code of what you want to achieve?  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_2 on 2015-03-11. Score: 2
  
  Load the entries into a div then create several buttons to change the width of the div, or use JS to resize the div. Thus showing your users what happens to the responsiveness of the design at different widths. It doesn't need to be a iframe. Or just send them to a template with a UI element showing them to resize the browser.
  
  > **Comments:**
  > **username_0**: OK I'll try out using just a div. I see most of the examples showing within an iframe but since I'm using the same css for examples I guess this makes sense.  
  > **username_0**: Nope that doesn't work because the div will not trigger a media query only the browser window and I guess that's why it has to be contained in an iframe.  
  > **username_2**: Then create route in the CP to a specific url. Output those entries in the specified template of that route. Then use the url of the route to load in your iframe.  
  > **username_0**: I'm not sure what you mean by "Then use the url of the route to load in your iframe." Could you please expand on that?  
  > **username_2**: When you create a route in the CP you are creating a url to a page. A page with a specified template.  
  > **username_0**: Yes I understand what routes are but not sure I understand how to pass the url to the iframe.  
  > **username_2**: Sorry, use the src tag for that route.  <iframe src='route/url'>   That will show load those items into the iframe.  
  
  ---
  
  