Revision 26afc97d
Added by Francisco Revilla over 14 years ago
modules/cdm_dataportal/cdm_dataportal.module | ||
---|---|---|
1537 | 1537 |
|
1538 | 1538 |
$template = null; |
1539 | 1539 |
// find best matching default RenderTemplate in theme |
1540 |
//echo "<br/><br/>".$renderPath; |
|
1540 |
//echo "<br/><br/>RENDER PATH: ".$renderPath; |
|
1541 |
//var_dump('RENDER PATH: ' . $renderPath); |
|
1541 | 1542 |
while(!is_array($template) && strlen($renderPath) > 0){ |
1542 | 1543 |
$template = theme('get_nameRenderTemplate', $renderPath); |
1543 | 1544 |
$renderPath = substr($renderPath, 0, strrpos($renderPath, '.')); |
... | ... | |
1598 | 1599 |
}else{ |
1599 | 1600 |
unset($template['referencePart']['#uri']); |
1600 | 1601 |
} |
1601 |
|
|
1602 |
|
|
1602 | 1603 |
return $template; |
1603 | 1604 |
} |
1604 | 1605 |
|
modules/cdm_dataportal/classes/renderhints.php | ||
---|---|---|
40 | 40 |
return array_pop(self::$renderStack); |
41 | 41 |
} |
42 | 42 |
|
43 |
public static function sizeof(){ |
|
44 |
return sizeof(self::$renderStack); |
|
45 |
} |
|
46 |
|
|
43 | 47 |
/** |
44 | 48 |
* |
45 | 49 |
* @return |
modules/cdm_dataportal/theme/cdm_dataportal.name.theme | ||
---|---|---|
238 | 238 |
|
239 | 239 |
function theme_cdm_taxonName($taxonName, $nameLink = NULL, $refenceLink = NULL){ |
240 | 240 |
|
241 |
$renderTemplate = get_nameRenderTemplate(RenderHints::getRenderPath(), $nameLink, $refenceLink); |
|
242 |
|
|
243 |
|
|
241 |
$renderTemplate = get_nameRenderTemplate(RenderHints::getRenderPath(), $nameLink, $refenceLink); |
|
244 | 242 |
$partDefinition = get_partDefinition($taxonName->class); |
245 | 243 |
|
246 | 244 |
// apply defintions to template |
modules/cdm_dataportal/theme/cdm_dataportal.page.theme | ||
---|---|---|
22 | 22 |
if(isset($taxon->name->nomenclaturalReference)){ |
23 | 23 |
$referenceUri = url(path_to_reference($taxon->name->nomenclaturalReference->uuid)); |
24 | 24 |
} |
25 |
$out = theme('cdm_taxonName', $taxon->name, null, $referenceUri); |
|
25 | 26 |
RenderHints::popFromRenderStack(); |
26 |
return '<span class="'.$taxon->class.'">'.theme('cdm_taxonName', $taxon->name, null, $referenceUri).'</span>'; |
|
27 |
|
|
28 |
return '<span class="'.$taxon->class.'">'.$out.'</span>'; |
|
27 | 29 |
} |
28 | 30 |
|
29 | 31 |
/** |
... | ... | |
36 | 38 |
if(isset($taxon_name->nomenclaturalReference)){ |
37 | 39 |
$referenceUri = url(path_to_reference($taxon_name->nomenclaturalReference->uuid)); |
38 | 40 |
} |
39 |
return '<span class="'.$taxon_name->class.'">'.theme('cdm_taxonName', $taxon_name, null, $referenceUri, $renderPath).'</span>'; |
|
41 |
return '<span class="'.$taxon_name->class.'">'.theme('cdm_taxonName', $taxon_name, null, $referenceUri, $renderPath).'###</span>';
|
|
40 | 42 |
} |
41 | 43 |
|
42 | 44 |
/** |
Also available in: Unified diff
taxon name at taxon page changed, related to chicago presentation