Hi,
I need to use "Author" meta tag on my web. I was able to create a custom meta tag in nodewords_custom.module:
function nodewords_custom_nodewords_tags_info() {
$tags = array(
'author' => array(
'tag:context:allowed' => array('default', 'node'),
'tag:db:type' => 'string',
'tag:function:prefix' => 'nodewords_author',
'tag:template' => array('author' => NODEWORDS_META),
'widget:label' => t('Author'),
'widget:permission' => 'edit meta tag Author',
),
);
return $tags;
}
The tag appeared in Meta Tags settings in "Meta tags to show on edit forms" and "Meta tags to output in HTML" but didn't in actual node edit form. Anyway, I'd like to use this tag as one per site so I need to add this tag among global default values. I wasn't able to find the procedure in README. Is it possible? Can you help?
Thank you.
Comments
Comment #1
avpadernoSee the code used in nodewords_basic.module. The module needs to add some functions that are called for some tasks; in particular, for the code you reported, the module should contain a function
nodewords_author_form(), which should return the form fields used in the meta tags edit forms.To make an example, this is the code that handles the canonical URL meta tag.
Comment #2
ilo commentedWhat is the purpose of nodewords_custom.module? should everyone be able to alter it? if so we should take care to not overwrite with module updates, otherwise I'd suggest to use the module as a template, but not edit the files..
Comment #3
avpadernonodewords_custom.module had that purpose, in the same way tokenSTARTER.module.
As everybody can create a custom module, I removed it.
In branch 6.x-3, nodewords_custom.module will have a different purpose, and it is not supposed to be altered from the users.
Comment #4
ilo commentedOh, probably we should document this..
Comment #5
Anonymous (not verified) commentedThe module has been removed, and it will added back to branch 6.x-3 later in the development of the branch.