Hi,
If you need to change those "labels" frequently, maybe you should
store them on the database:

Lead:
  columns:
    id: ...
    id_label: ...
    name: ...
    name_label: ...

So that you can do something like this:

...
<th><?php echo $leads->getIdLabel() ?></th>
<td><?php echo $leads->getId() ?></td>
...
<th><?php echo $leads->getNameLabel() ?></th>
<td><?php echo $leads->getName() ?></td>
...

In the other hand, if you do not need to change them so often, but
still you want the possibility to do it. I suggest you to write them
on the app.yml file of your application configuration.

...
<th><?php echo sfConfig::get('app_lead_idlabel') ?></th>
<td><?php echo $leads->getId() ?></td>
...
<th><?php echo sfConfig::get('app_lead_namelabel') ?></th>
<td><?php echo $leads->getName() ?></td>
...

Hope this helps you.

Filippo

On Jan 18, 12:32 pm, wueb <webmaster....@gmail.com> wrote:
> Hi,
>
> What i mean is, in a form we can define the labels for a field name in
> the form class, but on the showSucess we can't do it. We need write
> always the field names manual? Doesn't exist anything similiar to
> renderLabel() from forms?
>
> Instead of:
>
> <table>
>   <tbody>
>     <tr>
>       <th>Id:</th>
>       <td><?php echo $leads->getId() ?></td>
>     </tr>
>     <tr>
>       <th>Id user:</th>
>       <td><?php echo $leads->getIdUser() ?></td>
>     </tr>
>     <tr>
>       <th>Name:</th>
>       <td><?php echo $leads->getName() ?></td>
>     </tr>
>     <tr>
>       <th>Date:</th>
>       <td><?php echo $leads->getDate() ?></td>
>     </tr>
> </table>
>
> Something like:
>
> <table>
>   <tbody>
>     <tr>
>       <th><?php $leads['id']->renderLabel() ?</th>
>       <td><?php echo $leads->getId() ?></td>
>     </tr>
>     <tr>
>       <th><?php $leads['id_user']->renderLabel() ?</th>
>       <td><?php echo $leads->getIdUser() ?></td>
>     </tr>
>     <tr>
>       <th><?php $leads['name']->renderLabel() ?</th>
>       <td><?php echo $leads->getName() ?></td>
>     </tr>
>     <tr>
>       <th><?php $leads['date']->renderLabel() ?</th>
>       <td><?php echo $leads->getDate() ?></td>
>     </tr>
> </table>
>
> Is it possible?
-- 
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-us...@googlegroups.com.
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en.


Reply via email to