# Embedded pages

> A page of yours inside the student area: the home page, the welcome page shown on first access and the page in lessons, with the student data it receives.

An embedded page is a page from your website, or from an application of yours, that appears inside the student area. The student sees the page without leaving the platform. In **Settings > Embedded pages** you choose three things: the page that replaces the area's home screen, the page for the student's first entry and whether lessons can have an embedded page.

## How it works

Cademí opens your page in a frame inside the student area. The platform's menu and look stay around it. The page stays on your server: Cademí does not copy or change its content.

**The most important rule:** your page must allow being shown inside another site. If it doesn't, the frame stays blank. See **Good to know**.

An embedded page can go in several places in the student area:

| Where | How it is set up |
|---|---|
| The student area's home screen | **Student area home page**, on this screen |
| The student's first entry | **Welcome page**, on this screen |
| Below a lesson's content | **Allow embedded pages in lessons**, on this screen, and the **Embedded page** field in each lesson ([Modules and lessons](https://help.cademi.cloud/en/conteudo/modulos-e-aulas.md)) |
| An item in the student menu | A link of the **Embedded page** type in [Student area](https://help.cademi.cloud/en/configuracoes/area-do-aluno.md) |
| A showcase | A showcase whose destination is an **Embedded page** ([Showcases and groups](https://help.cademi.cloud/en/conteudo/vitrines-e-grupos.md)) |
| A whole product | A product in the **Embedded page** format ([Products and formats](https://help.cademi.cloud/en/conteudo/produtos.md)) |

This article explains the first three, which are on this screen. At the top of the screen, the **Advanced configuration** strip has the **View guide** button. It opens the guide to prepare your page.

## The fields on the screen

The **Student area** panel has two fields. Both are optional.

- **Student area home page** appears when the student opens the student area. Your page takes the place of the home screen. Showcases and products stay in the menu and the links.
- **Welcome page** appears only on the student's first entry into the platform. After that, the student goes to the normal home screen, or to your **Student area home page**, if there is one.

The **Lesson content** panel has the **Allow embedded pages in lessons** switch. On, each lesson gets the **Embedded page** field in the editor. Students see the page below the lesson's content.

Addresses must be complete and start with https://. Everything is saved at once, with **Save now**.

## Step by step

1. Open **Settings > Embedded pages**.
2. Paste the full address into **Student area home page**, into **Welcome page** or into both.
3. To allow pages in lessons, turn on **Allow embedded pages in lessons**.
4. Click **Save now**.
5. For a lesson, open the lesson in **Content > Products**.
6. Fill in **Embedded page** with the full address.
7. Enter the area as a student.
8. Check that the page opens inside the frame.

## What your page receives

When it opens an embedded page, Cademí adds to the address the data of the student viewing it. This way, your page can recognize the student.

| Parameter | Content |
|---|---|
| `cuser_id` | The student's code on the platform |
| `cuser_gratis` | 1 if the student has the free sign-up mark; 0 otherwise. A later purchase does not clear the mark. Only an administrator clears it, in the student profile |
| `cuser_fname` | The first name |
| `cuser_name` | The full name |
| `cuser_email` | The email |
| `cuser_phone` | The mobile phone |
| `cuser_avatar` | The address of the student's photo |

This data travels in the URL itself. Use only https pages. Handle the data with the same care as your own sign-up records. If you don't want your page to receive this data, ask support to turn the sending off.

## Good to know

- **The page must allow embedding.** If your hosting blocks pages inside other sites, the frame stays blank. To check:
  1. Open the area as a student.
  2. Right-click and choose inspect.
  3. In the console, look for a message such as "Refused to display in a frame".

  If the message appears, ask your hosting provider to allow embedding for your platform's address.
- **Frame height in lessons.** In a lesson, the frame takes the height of the page's content. For that, the page must load Cademí's resizing script: `https://core.cademi.com.br/assets/js/vendor/iframeResizer.contentWindow.min.js`. Without it, the lesson frame gets no height. The home page and the welcome page take up the whole screen and don't need this script.
- **The welcome page opens on its own once.** It appears on each student's first entry. So students can go back to it, create a menu link of the **Platform page** type with the **First Access** page ([Student area](https://help.cademi.cloud/en/configuracoes/area-do-aluno.md)). That page is only available when there is a welcome page. An administrator who views the area as a student does not go through it.
- **No notice when the page is down.** If your page goes down, the frame is empty and the student sees no error. If you are not sure the page is always up, leave the home page blank.
- **Clone.** A clone is born with a copy of the source account's settings, including these addresses. After that, each account keeps its own. Changing an address in the source does not change the clone.

## Frequently asked questions

**I want a welcome page only the first time the student enters.** Paste the address into **Welcome page**. The student sees the page once. From the second entry on, they go to the normal area.

**The page is blank inside the platform, but opens normally in the browser.** The hosting blocks embedding. Check the browser console and ask your hosting provider to allow it.

**Can I use the same page on the home screen and in a lesson?** Yes. In the lesson, it must load the resizing script to have height.

**The home page went down and students saw an empty screen.** The frame shows no error when your page goes down. Leave **Student area home page** blank until the page is back.
