How to get schema name from schema object in Tridion?

As part of the implementation of the button on the ribbon toolbar. I need a schema name in a Button java script file. Therefore, I am trying to use the following command to get the schema object.

$display.getView().getItem().getSchema();

The above command will return the schema object. But how to get the schema name from the schema object. Please help me with this. Thanks in advance. An early response is appreciated.

+5
source share
2 answers

Using the following command, you can access the schema name.

$display.getView().getItem().getSchema().getStaticTitle();

Thanks Romkes for your help.

Hey Pufflin, I'm not saying this is the only solution. But this command works without delay. Sorry if I hurt any feelings.

-5
source

, .load(true) . () - .

.load() , "", .

, ( ):

var schemaObject = $display.getView().getItem().getSchema();
function loaded()
{
    alert(schemaObject.getTitle());
}
$evt.addEventHandler(schemaObject, "load", loaded);
schemaObject.load(true);
+10

All Articles