Sto cercando di inserire l'immagine di sfondo al template protostar, come è stato suggerito qui.
Ho provato in svariati modi e non mi funziona!
Era da tanto che non mi cimentavo con queste cose.
l'index.php, in joomla 3.4, ora è così:
<body class="site <?php echo $option
. ' view-' . $view
. ($layout ? ' layout-' . $layout : ' no-layout')
. ($task ? ' task-' . $task : ' no-task')
. ($itemid ? ' itemid-' . $itemid : '')
. ($params->get('fluidContainer') ? ' fluid' : '');
echo ($this->direction == 'rtl' ? ' rtl' : '');
?>">
<?php
$doc->addScriptDeclaration('
(function($) {
$(document).ready(function() {
$.backstretch(["templates/protostar/images/tua_immagine.jpg"]);
});
})(jQuery);
');
?>
<!-- Body -->
<div class="body">
<div class="container<?php echo ($params->get('fluidContainer') ? '-fluid' : ''); ?>">
Sopra viene detto di inserire tra gli header questo codice:
$doc->addScript('templates/'.$this->template.'/js/jquery.backstretch.js');
L'header del mio index.php è questo:
<body class="site <?php echo $option
. ' view-' . $view
. ($layout ? ' layout-' . $layout : ' no-layout')
. ($task ? ' task-' . $task : ' no-task')
. ($itemid ? ' itemid-' . $itemid : '')
. ($params->get('fluidContainer') ? ' fluid' : '');
echo ($this->direction == 'rtl' ? ' rtl' : '');
?>">
<?php
$doc->addScriptDeclaration('
(function($) {
$(document).ready(function() {
$.backstretch(["templates/protostar/images/tua_immagine.jpg"]);
});
})(jQuery);
');
?>
<!-- Body -->
<div class="body">
<div class="container<?php echo ($params->get('fluidContainer') ? '-fluid' : ''); ?>">
<!-- Header -->
<header class="header" role="banner">
<div class="header-inner clearfix">
<a class="brand pull-left" href="<?php echo $this->baseurl; ?>/">
<?php echo $logo; ?>
<?php if ($this->params->get('sitedescription')) : ?>
<?php echo '<div class="site-description">' . htmlspecialchars($this->params->get('sitedescription')) . '</div>'; ?>
<?php endif; ?>
[/url]
<div class="header-search pull-right">
<jdoc:include type="modules" name="position-0" style="none" />
</div>
</div>
</header>
Scusatemi ma non riesco proprio a capire come inserire quel codice tra gli header.
Sono riuscito, poi, a scaricare il plugin da qui:
https://github.com/srobbin/jquery-backstretch/zipball/masterVorrei sapere, di tutti quei files e cartelle, cosa dovrei copiare nella directory "/protostar/js"?
Ringrazio anticipatamente per le risposte che mi vorrete dare.
Saluti, Franco