Difference between revisions of "Creating a basic index file/nl"

From Joomla! Documentation

(Created page with "Ongelooflijk, dit is voldoende! Ja, het is een heel eenvoudige lay-out, maar het werkt. Alles wordt gedaan door Joomla!. Deze regels, meestal genoemd S:MyLanguage/jdoc verkl...")
(Created page with "Module posities")
Line 48: Line 48:
 
Ongelooflijk, dit is voldoende! Ja, het is een heel eenvoudige lay-out, maar het werkt. Alles wordt gedaan door Joomla!. Deze regels, meestal genoemd [[S:MyLanguage/jdoc verklaringen|jdoc staten]], vertellen Joomla wat toe te voegen aan de uitvoer van bepaalde onderdelen van het Joomla systeem. Opmerking: u moet ervoor zorgen dat uw menu is ingesteld op de module-positie "top".
 
Ongelooflijk, dit is voldoende! Ja, het is een heel eenvoudige lay-out, maar het werkt. Alles wordt gedaan door Joomla!. Deze regels, meestal genoemd [[S:MyLanguage/jdoc verklaringen|jdoc staten]], vertellen Joomla wat toe te voegen aan de uitvoer van bepaalde onderdelen van het Joomla systeem. Opmerking: u moet ervoor zorgen dat uw menu is ingesteld op de module-positie "top".
  
====Module Positions====
+
Module posities
  
 
Above, the line which says <code>name="top"</code> adds a module position called ''top'' and allows Joomla to place modules into this section of the template. The <code>type="component"</code> line contains all articles and main content (actually, the [[S:MyLanguage/component|component]]) and is very important. It goes in the centre of the template.  
 
Above, the line which says <code>name="top"</code> adds a module position called ''top'' and allows Joomla to place modules into this section of the template. The <code>type="component"</code> line contains all articles and main content (actually, the [[S:MyLanguage/component|component]]) and is very important. It goes in the centre of the template.  

Revision as of 06:55, 15 April 2016

Other languages:
Deutsch • ‎English • ‎Nederlands • ‎español • ‎français • ‎русский • ‎中文(台灣)‎
Joomla! 
3.x
Joomla! 
2.5

Het index.php -bestand wordt de kern van elke pagina die Joomla! levert. In wezen, maak je een pagina (zoals een HTML-pagina), maar plaats je S:MyLanguage/PHP/PHP -code waar de inhoud van uw site moet komen. De template werkt door het toevoegen van Joomla code op de module posities en de component sectie van uw sjabloon. Als er iets wordt toegevoegd aan de template, wordt dir weergegeven op alle pagina's, tenzij het is toegevoegd aan een van deze secties via het Joomla CMS (of aangepaste code).

Deze pagina toont de kale code klaar om te knippen en plakken in uw eigen ontwerp.

Begin

Een Joomla template begint met de volgende regels:

<?php defined( '_JEXEC' ) or die( 'Restricted access' );?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" 
   xml:lang="<?php echo $this->language; ?>" lang="<?php echo $this->language; ?>" >

De eerste lijn stopt ondeugende mensen om naar uw code te kijken en slechte dingen te doen.

The second line is the Document Type Declaration (DOCTYPE), which tells the browser (and web crawlers) which flavor of HTML the page is using. The doctype used above is HTML5, a newer version of HTML that is largely backwards compatible, but contains many new features. You should be aware that this will not work well in Internet Explorer 8 or earlier without a hack. You might want to investigate this situation and your clients' wishes before deciding on which doctype you want to use. However this is used in Joomla Joomla 3.0 and higher.

De derde regel begint ons HTML-document en beschrijft in welke taal de website is. Een html-document is verdeeld in twee delen, head en body. De head bevat de informatie over het document en de body zal website code bevatten waarmee u de lay-out definieert..


Kop

<head>
<jdoc:include type="head" />
<link rel="stylesheet" href="<?php echo $this->baseurl ?>/templates/system/css/system.css" type="text/css" />
<link rel="stylesheet" href="<?php echo $this->baseurl ?>/templates/system/css/general.css" type="text/css" />
<link rel="stylesheet" href="<?php echo $this->baseurl ?>/templates/<?php echo $this->template; ?>/css/template.css" type="text/css" />
</head>

De eerste regel geeft Joomla de juiste header-informatie. Dit is de pagina titel, meta-informatie, evenals JavaScript code. De rest maakt twee links naar systeem style sheets en naar uw eigen opmaakmodel (als het genoemde template.css en is staat in de "css" map van uw template. Dus als uw template in http://www.mysite.com/templates/my_template/ staat, dan staan de css-bestanden in http://www.mysite.com/templates/my_template/css/).

Body-Gedeelte

<body>
<jdoc:include type="modules" name="top" /> 
<jdoc:include type="component" />
<jdoc:include type="modules" name="bottom" />
</body>

Ongelooflijk, dit is voldoende! Ja, het is een heel eenvoudige lay-out, maar het werkt. Alles wordt gedaan door Joomla!. Deze regels, meestal genoemd jdoc staten, vertellen Joomla wat toe te voegen aan de uitvoer van bepaalde onderdelen van het Joomla systeem. Opmerking: u moet ervoor zorgen dat uw menu is ingesteld op de module-positie "top".

Module posities

Above, the line which says name="top" adds a module position called top and allows Joomla to place modules into this section of the template. The type="component" line contains all articles and main content (actually, the component) and is very important. It goes in the centre of the template.

Note: You can add your own module lines anywhere you want in the body, but you have to add a corresponding line to the templateDetails.xml file which sits alongside the index.php of your template.

End

Finish it off - one last bit:

</html>

Custom Images

If you want to add any images to the template you can do so like this:

<img src="<?php echo $this->baseurl; ?>/templates/<?php echo $this->template; ?>/images/myimage.png" alt="Custom image" class="customImage" />

Here the template variable will fill in the name of your template.

Custom CSS

You can add custom css like this:

<link rel="stylesheet" href="<?php echo $this->baseurl ?>/templates/<?php echo $this->template;?>/css/styles.css" type="text/css" />

Every file which is added must have a line in the templateDetails.xml file for the template, unless it resides in a sub-folder (which can be included in a <folder> element).