RSS   Twitter   Copiny   Copiny
Нашел ошибку? 

Выдели фрагмент текста с ошибкой или неточностью и нажми Ctrl+Enter!

Переменные в шаблоне

Переменные, которые можно использовать в шаблоне Joomla

Получение названия текущего шаблона

<?php $this->template; ?>

Получение базового URL

<?php $this->baseurl; ?>

Получение Title страницы

<?php $this->title; ?>

Соответственно, если хотим установить Title для всех страниц вида «Имя сайта — Заголовок данной страницы», достаточно в шаблоне прописать следующее:

<?php $this->title = JFactory::getConfig()->getValue('sitename').' - '.$this->title; ?>

Удаление неиспользуемых JavaSript в шаблоне

Например, нужно исключить загрузку /media/system/js/mootools-core.js в шаблоне:

<?php unset($this->_scripts[$this->baseurl.'/media/system/js/mootools-core.js']); ?>

Установка своего значения для мета-тега generator

<?php $this->_generator = 'Мой генератор';?>

Текущая локализация

<?php $this->language; ?>

Текущий URL

<?php $this->base; ?>

Полный путь к файлу шаблона

<?php $this->_file; ?>

Получение параметра шаблона

<?php $this->params->get('Параметр'); ?>

Смотрите также:
Комментарии (18) Добавить комментарий
  • Ирина
    Ирина
    27 Мая 2013, 05:18
     ↑  0  ↓     ответ

    Спасибо! Хорошая статья!!!

  • Impulse
    Impulse
    23 Апреля 2014, 16:32
     ↑  +1  ↓     ответ

    <?php $this->title = JFactory::getConfig()->getValue('sitename').' - '.$this->title; ?>

    А как переписать ее в обратном направлении "Заголовок страницы - имя сайта"

    • Impulse
      Impulse
      23 Апреля 2014, 17:11
       ↑  -2  ↓     ответ

      или как лучше оставить только title, а название сайта удалить

      • realbsb.ru
        realbsb.ru
        04 Июня 2014, 12:42
         ↑  0  ↓     ответ

        <?php $this->title = $this->title.' - '.JFactory::getConfig()->getValue('sitename'); ?>

      • realbsb.ru
        realbsb.ru
        04 Июня 2014, 12:43
         ↑  -2  ↓     ответ

        С удаленным названием сайта:

        <?php $this->title = $this->title; ?>

      • Иван
        Иван
        10 Октября 2017, 17:41
         ↑  0  ↓     ответ

        Если вообще не понимаешь что происходит - то лучше и не заниматься этим. Как можно такие вопросы задавать... Взять и поменять местами 2 переменные. Додуматься никак что ли? Ужас!

  • shoes including
    shoes including
    05 Марта 2017, 16:09
     ↑  0  ↓     ответ

    Its like you learn my mind! You seem to grasp a lot approximately this, like you

    wrote the guide in it or something. I think that you just

    could do with a few p.c. to drive the message home a bit,

    however instead of that, that is magnificent blog.

    An excellent read. I'll certainly be back.

  • seo services images
    seo services images
    05 Марта 2017, 16:28
     ↑  +1  ↓     ответ

    Great article! That is the kind of info that are supposed to be shared

    around the internet. Disgrace on Google for now not positioning this post higher!

    Come on over and talk over with my site . Thanks =)

  • The Easiest Way to Write an Essay
    The Easiest Way to Write an Essay
    19 Февраля 2018, 06:19
     ↑  0  ↓     ответ

    My coder is trying to convince me to move to .net from PHP.

    I have always disliked the idea because of the costs. But he's tryiong

    none the less. I've been using Movable-type on numerous

    websites for about a year and am worried about switching

    to another platform. I have heard fantastic things about blogengine.net.

    Is there a way I can import all my wordpress content into

    it? Any help would be really appreciated!

  • Assignment Help
    Assignment Help
    19 Февраля 2018, 07:40
     ↑  0  ↓     ответ

    Really no matter if someone doesn't know after that its up to

    other people that they will assist, so here it takes place.

  • domino y hosting
    domino y hosting
    21 Февраля 2018, 02:53
     ↑  0  ↓     ответ

    I read this piece of writing fully about the comparison of latest and earlier

    technologies, it's remarkable article.

  • Come rimuovere il grasso dalle gambe senza dieta
    Come rimuovere il grasso dalle gambe senza dieta
    15 Марта 2018, 11:26
     ↑  0  ↓     ответ

    Thanks for one's marvelous posting! I genuinely enjoyed reading it, you will be a great author.I will remember to bookmark your blog and may come back from now on. I want to encourage you continue your great writing, have a nice weekend!

  • Agen Judi Online
    Agen Judi Online
    24 Марта 2018, 01:18
     ↑  0  ↓     ответ

    Modal dalam bermain taruhan judi bola on-line odd

    even.

  • новые игры
    новые игры
    05 Мая 2018, 04:38
     ↑  0  ↓     ответ

    На позапрошлой неделе Я забрал бабло в этом любимом казино

  • agen judi bola
    agen judi bola
    31 Мая 2018, 15:53
     ↑  0  ↓     ответ

    Valentine's Working day is pretty much listed here and you must

    place on your considering caps to make your mind up which gift would be the

    appropriate one for your valentine. If you have by

    no means gifted flowers, this time you can categorical your

    really like with valentine bouquets. No matter whether it is your sweetheart

    or your spouse, you must keep in mind that girls enjoy valentine bouquets.

    Your loved one will shower you with far more love if you are profitable in picking out

    the very best valentine bouquets.

    On-line flower stores offer a assortment and therefore you will not

    have any challenge deciding on them. You can then select to deliver the flowers by article and

    surprise your particular person. Make confident you decide

    on an on the net florist who sends new valentine flowers by submit.

    If the assistance of bouquets by put up involves

    totally free supply, then you must choose for it.

    Why do men and women ship valentine bouquets by publish?

    As you know, Valentine's Day is the most romantic working day in the calendar year.

    Therefore, on this working day you can say it ideal with flowers.

    There can not be any greater way of demonstrating that you care.

    Numerous folks regard it to be an act of like to

    deliver flowers by write-up. It is also a ways of expressing that

    you are imagining about your beloved. If you want to be

    a lot more passionate this calendar year, then you can gift some

    dim chocolate alongside with valentine flowers.

    In fact, bouquets are among the most well-liked present for a passionate

    celebration. Therefore, you can never go incorrect with

    valentine flowers.

    Deciding upon the proper valentine flowers can be a little bit complicated.

    Now in this article are practical tips for

    you. Many folks assume that crimson roses are the only proper bouquets intended for Valentine's Working day.

    That makes roses major the record of popularity when it arrives to valentine flowers.

    Purple roses are typical alternatives but orange, white, yellow, and pink roses are also well known these days.

    If the receiver ended up a classy human being then proper flower would be tulips.

    A particular person who matches the tulip personality is one particular who

    is just irresistible and pretty spontaneous. Orchid

    is a well-known merchandise as well and it is

    best for another person who is mysterious, daring, and exotic.

    Daisies are fantastic Valentine flower for these who are sentimental sweet, and caring.

    Lily bouquets are terrific for individuals who are generally

    sincere. If your beloved is, a pretty devoted particular

    person then you can send a bouquet of beautiful carnations.

    Ship the bouquets by publish on the D-working day.

  • situs judi bola resmi
    situs judi bola resmi
    01 Июня 2018, 04:36
     ↑  0  ↓     ответ

    Valentine's Day is practically below and you ought to

    place on your considering caps to come to a decision which

    reward would be the appropriate just one for your

    valentine. If you have hardly ever gifted bouquets,

    this time you can specific your love with valentine bouquets.

    No matter if it is your sweetheart or your wife, you ought

    to bear in mind that females like valentine flowers.

    Your liked 1 will shower you with much more really like if

    you are productive in deciding upon the most effective valentine bouquets.

    On the web flower suppliers offer a variety and as a result you will not have any challenge selecting them.

    You can then pick out to send out the bouquets by put up and surprise your

    particular particular person. Make guaranteed you find an on the net florist who sends fresh

    new valentine flowers by put up. If the service of bouquets by publish consists of free delivery, then you

    need to decide for it.

    Why do individuals send valentine bouquets by write-up?

    As you know, Valentine's Working day is the most intimate

    working day in the 12 months. Thus, on this working day you can say it greatest with bouquets.

    There simply cannot be any far better way of exhibiting that you treatment.

    Quite a few folks regard it to be an act of enjoy to mail bouquets

    by write-up. It is also a ways of expressing that you are thinking about your beloved.

    If you want to be more passionate this calendar year, then you can present some dark chocolate

    alongside with valentine bouquets. In fact, flowers are amid the most

    well-known present for a romantic occasion. Consequently,

    you can under no circumstances go improper with valentine bouquets.

    Picking the right valentine bouquets can be a little bit perplexing.

    Now here are useful solutions for you. Numerous people feel that pink roses

    are the only acceptable bouquets meant for Valentine's Working day.

    That will make roses leading the list of acceptance when it arrives to valentine bouquets.

    Pink roses are common selections but orange, white,

    yellow, and pink roses are also well known these days.

    If the recipient had been a attractive person then ideal flower

    would be tulips. A person who matches the tulip identity is a person who is

    just irresistible and really spontaneous. Orchid is a well-liked item as perfectly and it is very

    best for another person who is mysterious, daring, and exotic.

    Daisies are great Valentine flower for all those who are sentimental sweet, and caring.

    Lily bouquets are wonderful for individuals who are usually sincere.

    If your beloved is, a extremely devoted person then you can send out a

    bouquet of beautiful carnations. Send the flowers by put up on the D-working day.

  • trainingesrl.blogspot.com
    trainingesrl.blogspot.com
    16 Июня 2018, 20:54
     ↑  0  ↓     ответ

    Hi, I do believe this is a great blog. I stumbledupon it ;) I am going to revisit yet again since i have bookmarked it.

    Money and freedom is the best way to change, may

    you be rich and continue to guide others.

  • read me
    read me
    10 Июля 2018, 20:47
     ↑  0  ↓     ответ

    Link exchange is nothing else however it is

    simply placing the other person's webpage link on your page at suitable

    place and other person will also do similar in favor of you.

Оставить комментарий




* обязательно для заполнения

1 введенный почтовый адрес используется только для обратной связи при ответах в комментариях и сервиса gravatar.com
.