Pagina 1 di 1

Link HTML - Mi sfugge qualcosa.

Inviato: 16/01/2006, 15:33
da babbobug
Ho creato un semplice box nel quale ho inserito un'immagine. Intendo, ora, fare in modo che questa immagine linki una pagina html. Non riesco a risolvere 2 questioni:

-Qual'è la sintassi esatta del comando che devo inserire per creare il collegamento?

- In quale cartella, sul server, devo mettere la pagina HTML?

Il codice del box è:

<?php
$info_box_contents = array();
$info_box_contents[] = array('text' => tep_image(DIR_WS_IMAGES . 'bottone.gif'). RICETTE_TESTATA);
new infoBoxHeading($info_box_contents, false, false, null );

$info_box_contents = array();
$info_box_contents[] = array('align' => 'center', 'text' => tep_image(DIR_WS_IMAGES . 'libro_ricette.gif'));

new infoBox($info_box_contents);
?>

Grazie. :roll:

Re: Link HTML - Mi sfugge qualcosa.

Inviato: 16/01/2006, 21:00
da marcus
babbobug ha scritto:Ho creato un semplice box nel quale ho inserito un'immagine. Intendo, ora, fare in modo che questa immagine linki una pagina html. Non riesco a risolvere 2 questioni:

-Qual'è la sintassi esatta del comando che devo inserire per creare il collegamento?

- In quale cartella, sul server, devo mettere la pagina HTML?

Il codice del box è:

<?php
$info_box_contents = array();
$info_box_contents[] = array('text' => tep_image(DIR_WS_IMAGES . 'bottone.gif'). RICETTE_TESTATA);
new infoBoxHeading($info_box_contents, false, false, null );

$info_box_contents = array();
$info_box_contents[] = array('align' => 'center', 'text' => tep_image(DIR_WS_IMAGES . 'libro_ricette.gif'));

new infoBox($info_box_contents);
?>

Grazie. :roll:
Per il contenuto del Box usa questo codice inserendo testi e link:

Codice: Seleziona tutto

$information_box_content ='<a href="' . tep_href_link(FILENAME_DA_LINKARE) . '" title="Testo Link" target=_blank>tep_image(DIR_WS_IMAGES . 'libro_ricette.gif')</a><a href="' . tep_href_link(FILENAME_DA_LINKARE) . '" title="Testo Link"><p align="center" class=boxText><strong>Testo Box</strong></p></a>';


    $info_box_contents[] = array('align' => 'center', 'text' => $information_box_content);
La pagina Html da linkare la puoi mettere dove vuoi, ad es nella cartella catalog. Se non vuoi che il link si apra in una nuova finestra togli target=_blank.


Marcus

Inviato: 17/01/2006, 23:26
da babbobug
Spiacente ma credo che ci sia qualche errore di sintassi. :cry:

Inviato: 18/01/2006, 2:16
da marcus
babbobug ha scritto:Spiacente ma credo che ci sia qualche errore di sintassi. :cry:
Hai ragione, ecco il codice corretto:

Codice: Seleziona tutto

$information_box_content ='<a href="' . tep_href_link(FILENAME_DA_LINKARE) . '" title="Testo Link" target=_blank>' . tep_image(DIR_WS_IMAGES . 'libro_ricette.gif') . '</a><a href="' . tep_href_link(FILENAME_DA_LINKARE) . '" title="Testo Link"><p align="center" class=boxText><strong>Testo Box</strong></p></a>';


$info_box_contents[] = array('align' => 'center', 'text' => $information_box_content);
Marcus