So many times, when you make a choice or preference on the website, you return to the website only to discover that the preference is lost. If you prefer one version of the website to another and make that preference known by choosing, the website should store your choice in a cookie and remember it when you come back. We are going to implement this in Drupal:
1. Edit the
sites/default/settings.php
file. Search forcookie_domain
. Uncomment it out by deleting the#
character at the start of the line and change thecookie_domain
value todpk.local:
$cookie_domain = "dpk.local"
2. Edit the
template.php
of both sites, adding the highlighted lines to thedpk_mobile_preprocess_html
function:function dpk_mobile_preprocess_html(&$vars) { global $cookie_domain; drupal_add_library("system", "jquery.cookie"); drupal_add_js(array("cookie_domain" => $cookie_domain), "setting"); if (module_exists('rdf')) { $vars['doctype'] = '<!DOCTYPE...