07/02/2013, 12:18:40
non, dans le premier cas, la balise smarty ne génère que l'adresse d'une page (le href) alors que dans le second cas elle génère un lien complet vers une page (balise a).
donc, dans l'exemple 1
avec:
on obtient en affichage par exemple:
alors qu'avec fetch on obtient:
donc, dans l'exemple 1
avec:
Code :
[== Indéfini ==]
$smarty = &cmsms()->GetSmarty();
$smarty_data = "{cms_selflink href='region' text='$val' urlparam='?l=$val'}";
echo '<area alt="'.html_entity_decode($val).'" href="'.$smarty->display('string:'.html_entity_decode($smarty_data)).'" coords="'.$coo.'" shape="poly">';
on obtient en affichage par exemple:
Code :
[== Indéfini ==]
http://www.nextride.eu/region.html?l=Rhône-Alpes
<area shape="poly" coords="419,304,424,305,433,303,438,297,445,297,451,302,454,294,454,282,467,283,472,290,480,289,488,289,494,281,500,288,505,288,503,281,511,276,524,276,525,288,531,292,534,301,527,308,543,323,543,334,527,344,519,348,512,345,511,349,515,354,515,358,510,359,492,375,493,379,494,382,490,381,490,389,496,391,495,398,481,393,475,393,471,396,461,396,452,396,446,398,442,395,437,391,429,383,432,375,442,363,448,349,445,349,437,343,434,345,426,345,427,337,423,331,417,327,416,321,416,318,419,313,415,309,415,305" href="" alt="Rhône-Alpes">
alors qu'avec fetch on obtient:
Code :
[== Indéfini ==]
<area shape="poly" coords="419,304,424,305,433,303,438,297,445,297,451,302,454,294,454,282,467,283,472,290,480,289,488,289,494,281,500,288,505,288,503,281,511,276,524,276,525,288,531,292,534,301,527,308,543,323,543,334,527,344,519,348,512,345,511,349,515,354,515,358,510,359,492,375,493,379,494,382,490,381,490,389,496,391,495,398,481,393,475,393,471,396,461,396,452,396,446,398,442,395,437,391,429,383,432,375,442,363,448,349,445,349,437,343,434,345,426,345,427,337,423,331,417,327,416,321,416,318,419,313,415,309,415,305" href="http://www.nextride.eu/region.html?l=Rhône-Alpes" alt="Rhône-Alpes">