Answer the question
In order to leave comments, you need to log in
How to add last modified date to material text in Joomla 3?
In the content manager, I add a page and try to add an edit date. Standard solutions in the display settings do not work. Please help me how to write the code.
Answer the question
In order to leave comments, you need to log in
I'm pasting the code using paste directly into the material.
$id = JFactory::getApplication()->input->getInt('id', 0); // получаем ID материала
$db = JFactory::getDbo(); // объект БД
$query = $db->getQuery(true); // объект конструктора запросов
$query->select('modified');
$query->from($db->quoteName('#__content'));
$query->where($db->quoteName('id') . ' = ' . (int) $id);
$modified = $db->setQuery($query)->$db->loadResult();
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question