Saturday 07 November 2009 6:59:11 am
Hi Jean-Luc Apparently the urlAlias() method does not take into account the language you fetched the node in. It completely relies on eZURLAliasML, which on its turn relies on eZContentLanguage and the prioritized language list as defined for your site access. Although I did not try this, I think you can modify the prioritized language list, get the URL alias you want, and then restore the prioritized language list to its original value. Some code that might get you started:
$node = eZContentObjectTreeNode::fetch( 67, 'eng-US' );
$originalPrioritizedLanguages = eZContentLanguage::prioritizedLanguageCodes();
eZContentLanguage::setPrioritizedLanguages( array( 'eng-US' ) );
var_dump( $node->urlAlias() );
eZContentLanguage::setPrioritizedLanguages( $originalPrioritizedLanguages ); Let us know if that worked :)
independent eZ Publish developer and service provider | http://blog.coomanskristof.be | http://ezpedia.org
|