How to manage layout in Zend

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Hi, in some my view I've script code like this:


        <?php echo $this->headMeta(); ?>
        <?php echo $this->headTitle(); ?>

        <script type="text/javascript">


             var loaderHtml = '<div  style="text-align:center;width:
150px;display:none;"><img height="15px" src="<?php echo $this-
Quoted text here. Click to load it
             $('dd#city-element').prepend(loaderHtml);  // city parent
             $('dd#town-element').prepend(loaderHtml); //townparrent

             $('select#city option').remove();
             $('select#town option').remove();
             $('select#town').append('<option value="">Select town
             $('select#city').append('<option value="">Select city </

             $("button, input:submit, a", ".divRegister").button();
             $("button, input:submit, a",
".divRegister").click(function() {

                var validMess = requestValidation ();

                $('input,select').each (function(){
                    doValidationMess($(this), validMess);

            function changeTownList(cityId){


            function changeCityList(stateId){

                $('dd#city-element div').show();





 <h1>Add New User </h1>
       <div class="divRegister content">
           <?php echo $this->form ;?>

Now I've created a new layout/default.phtml page where set HTML and
HEADER for all pages... and use this layout in all views

my problem is this:

how Can I change my add.phtml??

In all other pages I do something like:

    <? $this->headScript()->appendFile($this->baseUrl('/js/
loginVerifiction.js')); ?>

<h1>Login </h1>
<div class="divLogin content">
    <?php echo $this->form ;?>

    <div style="padding-left:40px;">
        <span><a href="register" > Register </a></span> / <span><a
href="forgot" > Forgot password </a></span>
        <span class="errors" > <?php echo $this->errorMessage;  ?></span>
        <input id="hndmess" type="hidden" value="<?php echo $this-
Quoted text here. Click to load it


but when I have functions like in my posted add.phtml page, I don't
know where insert my script


Site Timeline