Ok, I fiured out a way to do it. I already have a customized theme for
the admin generator, so I just modified listSuccess.php and
editSuccess.php with the following code:
Edit:
<?php $title = $this->getI18NString( 'edit.title', $this-
>getModuleName() . ' edit', false ) ?>
[?php sfContext::getInstance()->getResponse()->setTitle(<?php
echo($title); ?>); ?]
<h1>[?php echo <?php echo $title ?>?]</h1>
List:
<?php $title = $this->getI18NString( 'list.title', $this-
>getModuleName() . ' list', false ) ?>
[?php sfContext::getInstance()->getResponse()->setTitle(<?php
echo($title); ?>); ?]
<h1>[?php echo <?php echo $title ?>?]</h1>
This seems like an awfully akward way to set the browser title, but at
least it works for now...
On Aug 9, 6:04 pm, Bjorn Wijers <[EMAIL PROTECTED]> wrote:
> Myke/Daniel,
>
> I don't know about Myke's first option, but the second one using
> javascript for this seems IMHO a bad idea.
>
> Personally I wouldn't feel comfortable using javascript for something
> simple as this nor would I like to rely on javascript. Besides one can
> also argue that this goes against the the seperation of content and
> code. Although I am by no means a Symfony guru it does strike me odd if
> there wouldn't be an easier way to accomplish this.
>
> All the best,
>
> grtz
> BjornWMyke Hines wrote:
> > Daniel,
> > That title entry in the generator.yml will only populate the <h1> of
> > the page section. You could
>
> > #1) Add setTitle() to all your actions
> > #2) Or add this into your layout...
> > <script>
> > document.title = $('sf_admin_container').getElementsByTagName
> > ('h1')[0].innerHTML
> > </script>
>
> > Hope that helps.
>
> > On 8/8/07, Daniel Staver <[EMAIL PROTECTED]> wrote:
> >> Is there a way to use the title setting from generator.yml in the
> >> TITLE tag? I'm only getting the title from view.yml. My layout.php
> >> uses <? include_title() ?> to generate the title.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"symfony users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en
-~----------~----~----~----~------~----~------~--~---