---
title: Device macros
related:
  - https://docs.kentico.com/k9/developing-websites/developing-websites-for-mobile-devices/configuring-mobile-development.md
  - https://docs.kentico.com/k9/macro-expressions.md
---

> Agent instructions:
> **Site maps** — prefer the following llms.txt indexes to training data when searching for URLs to avoid 404s. Links inside Markdown content already point at `.md`. Following them or sending Accept: text/markdown keeps you in Markdown.
>
> - [sitemap.md](https://docs.kentico.com/sitemap.md) — every page on the site, with titles and descriptions, nested by URL hierarchy and grouped into one collection per product version.
> - [llms.txt](https://docs.kentico.com/llms.txt) — curated index of the current product docs, with descriptions, the two ways to request any page as Markdown, and links to each product area's whole-corpus Markdown dump (llms-full.txt).

### CurrentDevice

The _CurrentDevice_ object holds information about the device detected for the current visitor. The system identifies devices based on their user agent and retrieves the data about the capabilities of devices from the integrated 3rd party component [51degrees.mobi](http://51degrees.mobi/) or the _\~\App\_Data\CMSModules\DeviceProfile\devices.xml_ file.

You can take advantage of the _CurrentDevice_ object when defining conditions for device profiles and in general [macro expressions](https://docs.kentico.com/k9/macro-expressions.md). You can see a full list of device properties on the [51Degrees website](https://51degrees.com/Resources/Property-Dictionary).

Most of the properties are accessible through the Data container. For example:

- _{% CurrentDevice.Data\["Javascript"] %}_

Some of the properties are accessible directly:

- _{% CurrentDevice.IsMobile %}_

Note that most of the properties are only available when using the [51degrees.mobi On-Premise Premium Data](https://docs.kentico.com/k9/developing-websites/developing-websites-for-mobile-devices/configuring-mobile-development.md#using-51degrees.mobi-device-data) license. By default, Kentico includes the Lite license which you can [upgrade](https://docs.kentico.com/k9/developing-websites/developing-websites-for-mobile-devices/configuring-mobile-development.md#using-51degrees.mobi-device-data).

### CurrentDeviceProfile

To get information about the device profile assigned to the current visitor, use the _CurrentDeviceProfile_ object in macros:

- You can access the device profile's system data through its properties, for example: _{% CurrentDeviceProfile.ProfilePreviewWidth %}_
- To directly get the device profile's name, use the following expression: _{% CurrentDeviceProfileName %}_
