This question is extension of this question: Current Username title instead Secondary menu title, but it is different.
I would like to how can I override the following part of code theme('links__system_secondary_menu',............)
which is in page.tpl.php
For example, if I want to change text => t('Secondary menu')
to text => t('Any new text')
.
One way to do this, which I think is just change that part in page.tpl.php
and it works perfectly.
OR
Is there any other way like hook-way to do this, so we can write function in template.php
and that override only that part?
from page.tpl.php
<?php if ($secondary_menu): ?>
<div id="secondary-menu" class="navigation">
<?php print theme('links__system_secondary_menu', array(
'links' => $secondary_menu,
'attributes' => array(
'id' => 'secondary-menu-links',
'class' => array('links', 'inline', 'clearfix'),
),
'heading' => array(
'text' => t('Secondary menu'),
'level' => 'h2',
'class' => array('element-invisible'),
),
)); ?>
</div> <!-- /#secondary-menu -->
<?php endif; ?>
Thanks,