Привет всем! Есть вопрос от новичка который пытается познять все в joomla так вот есть например стандартный шаблон rhuk_milkyway. в данном шаблоне есть файл index.php. первые несколько строк: <?php /** * @copyright Copyright (C) 2005 - 2008 Open Source Matters. All rights reserved. * @license GNU/GPL, see LICENSE.php * Joomla! is free software. This version may have been modified pursuant * to the GNU General Public License, and as distributed it includes or * is derivative of works licensed under the GNU General Public License or * other free or open source software licenses. * See COPYRIGHT.php for copyright notices and details. */ // no direct access defined( '_JEXEC' ) or die( 'Restricted access' ); ?> <!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="<?php echo $this->language; ?>" lang="<?php echo $this->language; ?>" > <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/rhuk_milkyway/css/template.css" type="text/css" /> <link rel="stylesheet" href="<?php echo $this->baseurl ?>/templates/rhuk_milkyway/css/<?php echo $this->params->get('colorVariation'); ?>.css" type="text/css" /> <link rel="stylesheet" href="<?php echo $this->baseurl ?>/templates/rhuk_milkyway/css/<?php echo $this->params->get('backgroundVariation'); ?>_bg.css" type="text/css" /> а теперь вопрос: в шаблоне идет речь о классе $this скажите плиз что за класс скрывается в этой пременной какие у него есть методы какие есть члены-класса итд... или где это можно прочитать.
Note that the $this object in the template is always the current instance of the JDocument object. Also note that $this->params is an object of type JParameter. For example, suppose your template has a parameter called templateColour which takes various string values which determine the colour scheme to be used. The colour schemes themselves are defined in CSS files which include the colour name as part of their file names. The following code retrieves the parameter then adds the appropriate stylesheet to render the page in the required colour scheme. Код (PHP): <?php $tplColour = $this->params->get( 'templateColour' ); $this->addStyleSheet( $this->baseurl . '/templates/' . $this->template . '/css/' . $tplColour .'.css' ); ?> Retrieving parameter data in a template file Objects, methods and properties available from your template
Thanks, but last time i found info about it i couldn`t find something useful. May be the cause is my poor English. So can I ask U just a little gift - show me some exact ans useful links about classes and some practice for templates and plugins. Plus from me as a bonus
_voland_, you needn`t write in english. I speak fluent enough russian. As for a little gift - I have to disappoint you. I do not have any useful links about J! classes exept those above. I`ve just opened joomla.org and found them under "developer" section of menu. The same could be done by yourself. Exuse me for my being using english, that was just a qoute from the official Joomla Wiki
кстати свежак мысль, особые случаи на английском описывать – будет траф иностранный на форуме а почему б не порыться на офф.сайте? там доки–то явно есть...