php - Chtml::link not getting ID of event attendee -


i'm trying redirect user view in events folder, going user folder id of event attendee.

the issue i'm having url returning without idea, in case should 56. /user/inviteguest/eventid no id

<p>you can invite guest attend event you.  <?php echo chtml::link("click here invite guest", array('/user/inviteguest', 'eventid' => eventattendees::model()->id))?></p> 

it doesn't seem getting id model , populating field id, works fine when link within event attendee views.

edit. example in view in eventattendees folder

array('label' => 'invite guests','buttontype'=>'link',  'icon' => 'group', 'url' => array('/user/inviteguest', 'eventid' => $data->id)), 

work fine

'eventid' => eventattendees::model()->id 

this not getting data, unless eventattendees' id set 56 default, odd. "id" used primary keys.

i think you're missing load data. maybe this:

// exemple, not actual tested code // in controller $attendee = eventattendees::model()->findbyattributes( array(      'whatever'=>$something, ));  $this->render('view', array(     'attendee'=>$attendee, ));    // in view <?php echo chtml::link("click here invite guest", array('/user/inviteguest', 'eventid' => $attendee->id))?></p> 

Comments

Popular posts from this blog

php - Wordpress website dashboard page or post editor content is not showing but front end data is showing properly -

How to get the ip address of VM and use it to configure SSH connection dynamically in Ansible -

javascript - Get parameter of GET request -