> For the complete documentation index, see [llms.txt](https://cmp.docs.sirdata.net/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://cmp.docs.sirdata.net/en/advanced-features/manually-display-cmp.md).

# Manually display the CMP

It is imperative to allow users to withdraw their consent at any time, in accordance with GDPR requirements.

This is why the icon ![](https://1869615683-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MUspPnkTFMlMDdGxvAb-1972196547%2Fuploads%2FTBxsa2Ig1hNQuh7zRT5p%2Fimage.png?alt=media\&token=ea7b2408-95b2-4710-a15c-8072874df733)allows them to view and modify their choices at any time.

However, it is possible to hide this icon by opting for another display mode. You can, in fact, display a link in the footer of your site instead, by selecting the appropriate option in the management console.

<figure><img src="https://1869615683-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MUspPnkTFMlMDdGxvAb-1972196547%2Fuploads%2FyTTDCfTsbILOC8zxbAOx%2Fimage.png?alt=media&amp;token=75071ee0-e01f-49bf-b172-19d52fa5c71d" alt=""><figcaption></figcaption></figure>

**Here are the steps to hide the icon and display a link in the footer:**

1. In the management console of your CMP, select the "Manage in the footer" option under the "Display style" section of the "Update images and button" tab.
2. Once this option is selected, add a link that allows users to reopen the CMP in the footer of your site (see below).
3. If you do not comply with the display rule allowing users to withdraw their consent via the footer, the system will automatically switch to the "icon" mode to ensure GDPR compliance.

Indeed, it is possible to trigger the display of the CMP with the JavaScript command `window.Sddan.cmp.displayUI()`. Depending on your needs, you can integrate this into a JavaScript script or in an HTML link on your site.

{% hint style="info" %}
Please note that this command will display the CMP only for users to whom GDPR applies, based on your CMP configuration. For other users, the CMP will not be displayed.
{% endhint %}

```javascript
//JavaScript script demo
<script>window.Sddan.cmp.displayUI();</script>
```

```html
<!-- HTML link demo -->
<a href="javascript:window.Sddan.cmp.displayUI();">Cookies settings</a>
```

It is crucial that the link to reopen the CMP is present on the page when it first loads. The CMP checks for the existence of this link at load time to determine whether or not it should display the consent icon. This means that the link must be synchronously integrated into the HTML code of the page.

It is therefore not possible to add it asynchronously, for example via a JavaScript script that would execute after the CMP is loaded. If the link is not present when the CMP performs its check, the icon will be displayed by default.

{% hint style="warning" %}
If this link is added asynchronously (for example, via JavaScript after the CMP has loaded), the CMP check will fail, and the icon will be displayed, which does not align with the expected behavior of the CMP without the icon when the link is present in the footer.
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://cmp.docs.sirdata.net/en/advanced-features/manually-display-cmp.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
