Shimoku docs
Search…
iFrame
An IFrame (Inline Frame) is an HTML document embedded inside another HTML document on a website. The IFrame HTML element is often used to insert content from another source or monitor a website (or more than one).

The method to use

The method is shimoku.plt.iframe()
It must contain the following input variables:
menu_path: str
url: str
order: int
And accepts the following input variables as optional:
title: Optional[str]
height: Optional[int]
rows_size: Optional[int]
cols_size: Optional[int]
padding: Optional[List[int]]

Video demonstration of the HTML iFrame

The iFrame settings and usage.

Examples

1. Default configuration

This one is configured to use the website https://teamaspar.com
url = 'https://teamaspar.com'
shimoku.plt.iframe(
url=url,
menu_path='test/iframe-1',
order=0,
rows_size=2, cols_size=12,
)
The result is:
The iFrame is in the default configuration.

2. Title for the iframe, size and padding

You can set a title for every site to monitor:
url = 'https://teamaspar.com'
shimoku.plt.iframe(
url=url,
menu_path='test/iframe-2',
order=0,
rows_size=2, cols_size=8,
padding='0,0,0,3',
title='TEAM ASPAR',
)
The result is:
Note the space before the component using padding='0,0,0,3', and size with cols_size=8.
You can also add sites to monitor, in the same menu_path='test/iframe-3'
This is an example:
url = 'https://www.teamaspar.com/'
shimoku.plt.iframe(
url=url,
menu_path='test/iframe-3',
order=0,
rows_size=2, cols_size=5,
title='TEAM ASPAR',
)
url = 'https://www.marca.com/'
shimoku.plt.iframe(
url=url,
menu_path='test/iframe-3',
order=1,
rows_size=2, cols_size=5,
padding='0,0,0,1',
title='MARCA',
)
The result is:
Two URLs are being monitored at the same path, spaced with padding='0,0,0,1'.
Changing menu_path The menu_path can be modified.
It is possible to use any number of rows.
Copy link
On this page
The method to use
Examples