Parameter Passed Into Attributelabels Function In Model

I have three views that are derived from the same model. But the labels are displayed differently in each form. can I pass a parameter into the attributeLabel function so that I can return an array of labels depending on which view is selected.

the labels in viewAuthor.php

Author Name

Author location

the labels in viewPublisher.php

Publisher Name

Publisher location

the labels in viewVendor.php

Vendor Name

Vendor location

the data from all the views are stored in the same table having two fields Name and Location.

There is no chance to pass parameter to attributeLabels().

One solution I would try (don’t know if it will work ) is to override getAttributeLabel() in your (base) model.

if u had 3 view files, then simply change on that pages…thats the simple way!!

and if one view page is rendering in 3 different actions ,check with the action->id

in this case u have 3 view files

the labels in viewAuthor.php

Author Name

Author location

the labels in viewPublisher.php

Publisher Name

Publisher location

the labels in viewVendor.php

Vendor Name

Vendor location

so simply change it in the view files, dont make it complicated. and in model simply the labels to name,location !!