The same wish was already articulated in forum, e.g.:
caveywavey wrote:I'm currently evaluating Joomla 1.5 for a future project and I hope somebody can help me with custom metatags - the project requires the content creation date and last modified date to be in the metadata amongst other things.
I have (either rightly or wrongly) found that:
1) editing the metadata parameters group in the administrator/components/com_content/models/article.xml file will give new metadata fields when editing an article which will then appear in the head section of the document if they're not empty.
2) editing the libraries/joomla/document/html/renderer/head.php file can be useful for adding custom metatags which are either constant or created programatically.
I have searched the forum/googled and found that there is a getModifiedDate function, but when I try and use it in the head.php file it always returns an empty string - unfortunately there doesn't appear to be a similar function for the created date.
I'm hoping that I can use the data stored about the article in the database table rather than recreate it by using the xml file to define the same data again.
spiderglobe wrote:First I must say a great solution to implement a separated metadata field in the article table! In this way the META data can be extend anyway and is automatically presented within the view.html.php within the article view. Just great.
Looking at the Article META data structure then I see that the structure is read from the article.xml from the models directory under com_content. This limits the extension of the META data structure to the articles. Sometimes you want to extend the META structure for specific purposes. Anyway it should be nice if this META data structure could be extended easily, for example with a separate XML just for the META data where third party XML meta structure could be added. This could be a "general" META XML structure used for all Joomla items (menu elements, articles, FAQ, etc..).
Looking at the MENU elements there is no metadata field in the menu table. Make this work the same as within the article structure (by using a generic XML meta file for all core Joomla elements).
What I'm also missing is a separate field in the Joomla items (= articles, menu, FAQ, etc..) where I can put a HTML title in. Note that this is different element then the page title which should appear in the HTML body section (with any tag the designer wants to assign to).
Also notice that when that the META fields are present when they are empty. Please don't display the META field if they don't have any content.
Problem: Current implementation of Content Editors ("Article Manager"...) in Joomla! core erases any metatags, that are unknown to the Editors, so any additional metatags are not preserved after editing of the Article.
And so metadata field is useless for extentions.
1. As you may see in the saveContent function in file "www/administrator/components/com_content/controller.php", Joomla! just receives request with data from Client, packs received "meta[tags]" into metadata
field and stores that field: it doesn't care about anything, that may be stored in
metadata field earlier, acting as if in knows everything
2. To the addition of above, it appears, that Editor receives only metatags, that are mentioned in
"/www/administrator/components/com_content/models/article.xml" file, i.e. only two meta tags for "metadata" field of content table: "robots" and "author".
I understand, that I may manually add new metatags to that "article.xml" file, but this would be hacking Joomla! core and not extension
Proposal: As long as there is no way for Joomla extensions to extend some "list of known meta tags" of the Article (e.g. "/www/administrator/components/com_content/models/article.xml"), I propose to change Joomla! core code so, that during saving of metadata (both from backend and from frontend) all "meta tags" with non empty values will be preserved, even those, that are unknown to particular content Editor.