Goedemiddag,
Voor een website wil ik graag per pagina een andere background-image gebruiken. Is het mogelijk dat deze background-image makkelijk aan te passen is door de eindgebruiker, niet dat de gebruiker in de code hoeft te duiken maar slechts een foto hoeft up te loaden via het adminpaneel?
Hier een voorbeeld van zo'n website met een grote background-image:
http://www.gilesrevell.com/
Alvast bedankt!
Groeten,
Ruud
[opgelost] Background-image
Moderator: velden
[opgelost] Background-image
Last edited by Haghorst on Tue Sep 18, 2012 12:28 pm, edited 1 time in total.
Re: Background-image
En wat te denken van de 'content_image' tag?
Standaard aanwezig en verschijnt meteen in de gebruiker hoeft niet naar de Options tab te klikken om het aan te passen.
Ik gebruik het zelf vaak voor foto's in de header van de pagina's.
Meer info via CMS -> Extensions -> Tags
Standaard aanwezig en verschijnt meteen in de gebruiker hoeft niet naar de Options tab te klikken om het aan te passen.
Ik gebruik het zelf vaak voor foto's in de header van de pagina's.
Meer info via CMS -> Extensions -> Tags
Help for the content_image tag Help (new window)
What does this do?
This plugin allows template designers to prompt users to select an image file when editing the content of a page. It behaves similarly to the content plugin, for additional content blocks.
How do I use it?
Just insert the tag into your page template like: {content_image block='image1'}.
What parameters does it take?
(required) block - The name for this additional content block.
Example:
{content_image block='image1'}
(optional) label - A label or prompt for this content block in the edit content page. If not specified, the block name will be used.
(optional) dir - The name of a directory (relative to the uploads directory, from which to select image files. If not specified, the uploads directory will be used.
Example: use images from the uploads/images directory.
{content_image block='image1' dir='images'}
(optional) class - The css class name to use on the img tag in frontend display.
(optional) id - The id name to use on the img tag in frontend display.
(optional) name - The tag name to use on the img tag in frontend display.
(optional) width - The desired width of the image.
(optional) height - The desired height of the image.
(optional) alt - Alternative text if the image cannot be found.
(optional) urlonly - output only the url to the image, ignoring all parameters like id, name, width, height, etc.
(optional) assign (string) - Assign the results to a smarty variable with that name.
Re: Background-image
Ik heb een sjabloon aangemaakt met de 'content_image' tag:
Echter pakt hij hem niet:
http://vangestelhoveniers.nl/cms/index.php?page=wie
Bij de home pagina http://vangestelhoveniers.nl/cms/ pakt hij hem wel.
Iemand enig idee?
Dit is de templatecode van de home pagina:
Ik heb ipv 'id' een 'class' gebruikt, dan werkt het wel.
In de map uploads/images/achtergronden heb ik enkele images geupload via FileZilla. Ik kan ze ook selecteren wanneer ik een pagina aan maak.{process_pagedata}
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<__html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" >
<head>
<title>{sitename} - {title}</title>
{metadata}
{cms_stylesheet}
</head>
</__body>
<div>
{content_image block='afbeelding1' dir='images/achtergronden' id='background'}
</div>
<div id="container">
<div id="logo">
<a id="logolink" href="http://www.vangestelhoveniers.nl/cms"> </a>
</div>
<div id="headertitle">
<div id="headertitle_tile">
<div id="headertitle_bg"></div>
<h1>{content block="Koptitel1"}</h1>
<h2>{content block="Koptitel2"}</h2>
</div>
</div>
<div id="menu">
{menu template="Menu_green"}
</div>
<div id="content">
<div id="content_content">
<h1>{title}</h1>
{content}</div>
</div>
<div class="push"></div>
</div><div id="fotos">
</div>
<div id="footergreen">
<div id="footerdiv">
--
</div>
</div>
<__body>
</__html>
Echter pakt hij hem niet:
http://vangestelhoveniers.nl/cms/index.php?page=wie
Bij de home pagina http://vangestelhoveniers.nl/cms/ pakt hij hem wel.
Iemand enig idee?
Dit is de templatecode van de home pagina:
UPDATE: OPGELOST{process_pagedata}
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<__html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" >
<head>
<title>{sitename} - {title}</title>
{metadata}
{cms_stylesheet}
</head>
</__body>
<div>
{content_image block='Achtergrond' dir='images/achtergronden' id='background'}
</div>
<div id="container">
<div id="logo">
<a id="logolink" href="http://www.vangestelhoveniers.nl/cms"> </a>
</div>
<div id="headertitle01">
<div id="headertitle_tile01">
{content block="Koptitel"}
</div>
</div>
<div id="menu">
{menu template="Menu_green"}
</div>
<div id="content">
{content}
</div>
<div class="push"></div>
</div><div id="fotos">
</div>
<div id="footergreen">
<div id="footerdiv">
--
</div>
</div>
<__body>
</__html>
Ik heb ipv 'id' een 'class' gebruikt, dan werkt het wel.
Re: Background-image
Werkt inderdaad keurig! 
Wil je nog even [opgelost] in de titel van de eerste post zetten?
Bedankt,
Rolf

Wil je nog even [opgelost] in de titel van de eerste post zetten?
Bedankt,
Rolf
- + - + - + - + - + - + -
LATEST TUTORIAL AT CMS CAN BE SIMPLE:
Migrating Company Directory module to LISE
Migrating Company Directory module to LISE
- + - + - + - + - + - + -