Skip to content

Commit

Permalink
Docs: Add description of extended configuration example
Browse files Browse the repository at this point in the history
  • Loading branch information
OndraM committed Nov 30, 2021
1 parent b6ecb31 commit fd7e8ba
Showing 1 changed file with 21 additions and 4 deletions.
25 changes: 21 additions & 4 deletions examples/configuration.html
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@

<h1 class="display-1 mt-md-3">Extended Configuration</h1>
<p class="lead mb-4 mb-md-5">
This is an example of extended configuration.
This is an example of an extended configuration.
</p>

<ul class="nav nav-pills justify-content-center mb-3">
Expand Down Expand Up @@ -71,11 +71,28 @@ <h1 class="display-1 mt-md-3">Extended Configuration</h1>
<div class="row justify-content-lg-center">
<div class="col col-lg-10 col-xl-8">

<h2 class="mt-md-3 mb-3">What is shown here</h2>

<ul class="mb-4">
<li>Forcing specific language – Slovak (using <code>defaultLang</code>), ie. disabling auto-detection (<code>autodetectLang</code>)</li>
<li>Setting multiple company names in the consent text (<code>companyNames</code>)</li>
<li>
Overwriting raw configuration of the underlying cookie-consent component (via <code>config</code> option),
to modify some advanced features.
</li>
<li>Clearing localStorage if user gives consent to only necessary data (<code>onFirstAcceptOnlyNecessary</code>)</li>
<li>Etc.</li>
</ul>

<p class="mb-4">
See page source for details.
</p>

<h2 class="mt-md-3 mb-3">Use cookieConsent instance</h2>

<p class="mb-4">
When <a href="https://github.com/lmc-eu/cookie-consent-manager#callbacks">callbacks</a> does not satisfy
your needs to conditional code execution, you can also store cookieConsent instance in a variable
When <a href="https://github.com/lmc-eu/cookie-consent-manager#callbacks">callbacks</a> don't satisfy
your needs for conditional code execution, you can also store cookieConsent instance in a variable
and access it later when needed – see source code.
</p>

Expand Down Expand Up @@ -106,7 +123,7 @@ <h2 class="mt-md-3 mb-3">Use cookieConsent instance</h2>
'github.example',
{
autodetectLang: false, // do not detect language from the `<html lang="...">` value
defaultLang: 'en', // force use of 'en' language instead
defaultLang: 'sk', // force use of 'sk' language instead
companyNames: ['LMC', 'Some Other Company', 'ACME'], // define custom company names to be shown in the consent text
consentCollectorApiUrl: 'https://ccm.lmc.cz/local-data-acceptation-data-entries?Spot=(public,demo)', // override default URL for demo purposes; do not set custom consentCollectorApiUrl unless you have been explicitly guided to do so!
config: { // override default config of the underlying library, see https://github.com/orestbida/cookieconsent#all-available-options
Expand Down

0 comments on commit fd7e8ba

Please sign in to comment.