我正在尝试将变量拉出并将其标签显示为可点击链接。但是,它只返回第一个字符。然后,当然链接无效,因为它只拉了一个字符。
$va_children = $t_object->get("ca_objects.children.preferred_labels", array('returnAsArray' => 1, 'checkAccess' => $va_access_values));
if(sizeof($va_children) > 0){
print "<div class='unit'><h2>"._t("Part%1", ((sizeof($va_children) > 1) ? "s" : ""))."</h2> ";
$i = 0;
foreach($va_children as $va_child){
# only show the first 5 and have a more link
if($i == 5){
print "<div id='moreChildrenLink'><a href='#' onclick='$(\"#moreChildren\").slideDown(250); $(\"#moreChildrenLink\").hide(1); return false;'>["._t("More")."]</a></div><!-- end moreChildrenLink -->";
print "<div id='moreChildren' style='display:none;'>";
}
print "<div>".caNavLink($this->request, $va_child['name'], '', 'Detail', 'Object', 'Show', array('object_id' => $va_child['object_id']))."</div>";
$i++;
if($i == sizeof($va_children)){
print "</div><!-- end moreChildren -->";
}
}
print "</div><!-- end unit -->";
}