append text to dialog/page title class

would like to append text to the end of the page /modal titles (eg: View Client - Phpmaker Inc)

i need to do this from eother listview selected item of on edit/view.

i see the

. but where is it being populated with the title text. would it be better to use jquery rather than php to alter it.
i see

<?php echo CurrentPageHeading() ?>

just wondering best method to manipluate these and where/how. is there a function rather than manipulating the classes

thx

i think this would be best ??

$(‘.modal-title’).append(’ Some text’);

final code:

<?php if ($clients_employees_docs_view->IsModal) { ?>

$(‘.modal-title’).append(‘<?php echo " - ".$clients_employees_docs_view->EmployeeId->ViewValue ?>’);

<?php } ?>