Hello !
I’m getting beter and better in Yams comprehension ! ..but
Keywords using multilingual TVS works (using step by step procedure here :
http://modxcms.com/forums/index.php/topic,49625.0.html) but there are somme troubles :
1. Create one template variable for each language and associate them with your templates: keywords_fr, keywords_ja in your case. The YAMS ManagerManager rules will automatically tabify them for you.
The YAMS ManagerManager does not tabify correctly :
- keywords_ja sometimes does not appear at all
- I added English language, then :
- Title_en appears in all tabs below the content
- keywords_fr appears on to of English tab
note : I’ve applied steps 1 (create TVs), 2 (modify <head> block) and 3 (modify mm_rules chuck)
// ------------------------ INSERT YOUR RULES HERE --------------------
// These are example rules -- replace them with your own
// PHP *is* allowed
// News editors role -- creating a variable makes it easier to manage if this changes in the future
$news_role = ’3’;
mm_hideFields(’pagetitle,menutitle,link_attributes,template,menuindex,description,show_in_menu,which_editor,is_folder,is_richtext,log,searchable,cacheable,clear_cache’, $news_role);
mm_renameTab(’settings’, ’Publication settings’, $news_role);
mm_synch_fields(’pagetitle,menutitle,longtitle’, $news_role);
mm_renameField(’longtitle’,’Headline’, $news_role, ’’, ’This will be displayed at the top of each page’);
// News story template
$news_tpl = ’10’;
mm_createTab(’Categories’,’HrCats’, ’’, $news_tpl, ’’, ’600’);
mm_moveFieldsToTab(’tvnewsbigimage’, ’general’, ’’, $news_tpl);
mm_changeFieldHelp(’longtitle’, ’The story\’s headline’, ’’, $news_tpl);
mm_changeFieldHelp(’introtext’, ’A short summary of the story’, ’’, $news_tpl);
mm_hideFields(’menuindex,show_in_menu’, ’’, $news_tpl);
mm_changeFieldHelp(’parent’, ’To move this story to a different folder: Click this icon to activate, then choose a new folder in the tree on the left.’, ’’, $news_tpl);
// For everyone
mm_default(’pub_date’);
mm_renameField(’introtext’,’Summary’);
mm_changeFieldHelp(’alias’, ’The URL that will be used to reach this story. Only numbers, letters and hyphens can be used’);
mm_widget_tags(’blogTags’); // Give blog tag editing capabilities to the ’blogTags’ TV
mm_widget_colors(’colour’, ’#666666’); // make a color selector widget for the ’colour’ TV
//mm_widget_showimagetvs(); // Always give a preview of Image TVs
mm_widget_showimagetvs(); // Always give a preview of Image TVs for ManagerManager
// For everyone except administrators
mm_hideFields(’link_attributes’, ’!1’);
//mm_moveFieldsToTab(’tvcolour’, ’general’);
// Added for YAMS
require( $modx->config[’base_path’] . ’assets/modules/yams/yams.mm_rules.inc.php’ );
$langIds = $yams->GetActiveLangIds();
foreach ( $langIds as $langId )
{
mm_widget_tags(’keywords_’ . $langId );
}
// ------------------------ END OF RULES --------------------
Have I done something wrong ?
Eric