Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8140319
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T12:07:26+00:00 2026-06-06T12:07:26+00:00

In Tornado, you can do if statements in the HTML such as {% if

  • 0

In Tornado, you can do if statements in the HTML such as {% if true %} do stuff {% end %}. I’d like to check if the page is within an iframe.

In Javascript, it would be something like: if (top === self) { not in a frame } else { in a frame }

How can I do this in with Tornado?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T12:07:28+00:00Added an answer on June 6, 2026 at 12:07 pm

    Javascript has access to the browser context but a templating system will only have access to the request object.

    If you control the creation of the iframe in question, for instance if that is happening on another part of your site, you might be able to pass get parameters in to the templating system or something… But in general this is something you have to do with javascript. Add javascript directly to your template or (better) include a javascript file. You can expose both the iframed and the non-iframed versions of your page in the template and have javascript select which one to show once it hits the browser.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Tornado is a webserver + framework like Django but for real-time features. On my
Tornado provides a tornado.database wrapper to access MySQL database: www.tornadoweb.org/documentation/database.html But in documentation I
I have lot of code in my Tornado app which looks like this: @tornado.web.asynchronous
I have a simple tornado server running like this: import json import suds from
I am using Apache and PHP as my front-end server and Tornado as my
Tornado web can be used wth WSGI or ASYNC container. There are numerous solutions
is tornado is the same as django ? can I upload tornado project to
How can I use unicode strings in tornado views or templates? I insert in
Frameworks like Node.js, Tornado, and Twisted let developers create server-push applications that supports large
In Tornado, you can link Regexes to RequestHandlers. The matched groups from the Regexes

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.