Uncle Cheese sir,
i wrote a code but this page $link not work so please suggest me.., al data fetch then show result but when page show with readmore link this link copy with "search" but i can't understand how to process or carry ID and behalf of this ID open related this data, so please sir help me..
mentor.ss
<div class="typography">
<% if Menu(2) %>
<% include SideBar %>
<div id="Content">
<% end_if %>
<% if Level(2) %>
<% include BreadCrumbs %>
<% end_if %>
<h2>$Title</h2>
$Content
<% if Students %>
<h2>$FirstName </h2>test
<p>$Lastname
<% control Students %>
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td><h3>$EventName</h3>
<p>$Date</p><p></p> <p>$Detail.LimitWordCountXML</p>
<a class="readMoreLink" href="$Link" title="Read more about "{$Title}"">Read more about "{$EventName}"...</a>
</li></td>
</tr>
<% end_control %>
</table>
<% else %>
<p>There is no any student working with this mentor.</p>
<% end_if %>
$Form
$PageComments
<% if Menu(2) %>
</div>
<% end_if %>
</div>
mentor.php
<?php
class Mentor extends Page {
static $db = array(
'EventName' => 'Text',
'Date' => 'Date',
'Detail' => 'Text'
);
static $has_many = array(
'Students' => 'Student'
);
function getCMSFields() {
$fields = parent::getCMSFields();
$fields->addFieldToTab( 'Root.Content.Main', new TextField( 'EventName', 'Event Name' ) );
$fields->addFieldToTab( 'Root.Content.Main', new DateField( 'Date' ) );
$tablefield = new HasManyComplexTableField(
$this,
'Students',
'Student',
array(
'EventName' => 'Event Name',
'Date' => 'Event Date',
'Detail' => 'Detail'
),
'getCMSFields_forPopup'
);
$tablefield->setAddTitle( 'A Student' );
$fields->addFieldToTab( 'Root.Content.Students', $tablefield );
return $fields;
}
function forTemplate() {
$template = 'GSOCPerson';
return $this->renderWith( $template );
}
}
class Mentor_Controller extends Page_Controller {
}
?>