Welcome, Guest. Register Now!
   
Mark Forums Read Mark Forums Read Mark Forums Read


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 06-15-2008, 07:31 AM
Junior Member
 
Join Date: Jun 2008
Posts: 4
Default how can i get the value?

the views:
PHP Code:
<?php foreach($this->data as $data) : ?> 
              <tr>
                <td><?php echo $this->escape($data->title);?></td>
                <td><?php echo $this->escape($data->content);?></td>
                <td><?php echo $this->escape($data->post_time);?></td>
                <td><?php echo $this->escape($data->publish);?></td>
                <td> 
<a href="/blog/admin/article/modify/<?php echo $this->escape($data->content_id);?>/">modify</a>                
<a href="/blog/admin/article/del/<?php echo $this->escape($data->content_id);?>/">del</a>
                </td>
              </tr>
        <?php endforeach; ?>
how can i get the value in modifyAction()
PHP Code:
<?php
class Admin_ArticleController extends Blog_Controller_Action  {
        ...
        function 
modifyAction(){
              
//get the value
        
}
}
?>

thanks
--dudu

Last edited by dudu : 06-15-2008 at 07:37 AM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 06-16-2008, 09:45 AM
Junior Member
 
Join Date: Apr 2008
Posts: 3
Default

Still pretty new to ZEND myself but this is how I have it...

PHP Code:
<a href="/blog/admin/article/modify/id/<?php echo $this->escape($data->content_id);?>/">modify</a>                 
<a href="/blog/admin/article/del/id/<?php echo $this->escape($data->content_id);?>/">del</a>
PHP Code:
<?php 
class Admin_ArticleController extends Blog_Controller_Action  
        ... 
        function 
modifyAction(){ 
               
$id = (int)$this->_request->getParam('id'0);
        } 

?>
You need to add 'id/' to the end of your links.

Hope this helps
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 06-16-2008, 12:18 PM
Junior Member
 
Join Date: Jun 2008
Posts: 4
Default

thanks, sticky
i get it
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 09:56 PM.