Add parent relationship title in edit page for custom module

Hi All ,

if i create project task under particular project

than for that created project task edit view

we can see something like this

Any one have any idea how to implement the same for custom module

i tried something like this in view.edit.php

i assign name to one variable
like this

    $this->ss->assign('name_value', $this->bean->name);

and use that variable in

this file example.tpl.js fiel and fetch that fie to one variable

$custom = $this->ss->fetch(‘custom/modules/ca_payment/tpls/example.tpl.js’)

$this->ss->assign(‘custom_name_code’, $custom);

but in editviewdefs.php under metadata folder

i don’t find a place to attach this custom code

can some one guide me on this

jim , will , andy ( admins ) your help will be appreciated

any idea how to implement this ???

.

i found that i need to over write getModuleTitle() function in sugarview class but how to do that in upgrade safe method ??

Hi there,

You could create a Module View class, extending the base class and override the getModuleTitle method in that class.

e.g.:


class MyCustomModuleViewEdit extends ViewEdit {
    public function getModuleTitle() {
        // do whatever you want here....
    }
}

put this class in the views folder of your custom module folder.

HTH.