O
O
Otrivin2017-03-16 16:59:42
PHP
Otrivin, 2017-03-16 16:59:42

How to get content title in Joomla?

Hello!
It is necessary to get the title of the material (aka h1) into the $tit variable.
How to do it?
Tried like this

<?php
     $document = &JFactory::getDocument();
     $tit = $document->title;
?>

But this is how I get the <title>pages.
Engine version 2.5.28

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Anton, 2018-01-05
@anton99zel

All figured out. I tried to get $_POST before it was formed.

M
McBernar, 2018-01-05
@McBernar

You have hell in your code.
Make a var_dump (or a banal echo of the passed $_POST) and see what comes or does not come. Is it difficult?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question