| Index
» Projekty
» phpMyEdit
» Fórum
» Cannot create simple link with a label |
 |
bobtreu
Založený: 22.10.2004
Príspevky: 3
Zaslal: 2011-10-11 18:53
Návrat hore
Odpovedať s citátom
|
I am trying to create a link that uses a label instead of the full text of the link. I can create one with a static value ('URLdisp' => '[Doc]' , but I want the value to change depending on the value returned from the table.
I need a link that looks like this [PH2001]
But points to
"http://somewhere.elswhere.com/phtech/index.php/PH_Caller_Codes#PH2001"
Here is what I tried, among many other attempts:
#I really do not understand the syntax intent here. This returns way too long a link.
| Kód: |
$opts['fdd']['caller_code'] = array(
'name' => 'Caller Code'
, 'select' => 'T'
, 'maxlen' => 200
, 'sort' => true
, 'sql' => 'CONCAT(\'somwhere.elsewhere.com/phtech/index.php/PH_Caller_Codes#\',caller_code)'
, 'URL' => 'http://$link'
, 'URLdisp' => $link
, 'URLtarget' => '_blank'
);
|
I could use static link, like 'URLdisp' => '[Doc]', if I could display the name of the "caller_code" next to it, but I also cannot figure out how to display the same column twice, once with its valu and once as a link.
Thanks for any help!!
|
bobtreu
Založený: 22.10.2004
Príspevky: 3
Zaslal: 2011-10-11 19:41
Návrat hore
Odpovedať s citátom
|
I did figure out how to include a column value a second time, and use a static link.
PH1001 | [DOC] |
I'd still like to know how to make [PH1001] show as the label rather than [DOC]. Then I would not need a second column for the link
|
doug
Založený: 10.02.2003
Príspevky: 1013
Bydlisko: Denver, Colorado (USA)
Zaslal: 2011-10-12 11:37
Návrat hore
Odpovedať s citátom
|
Abandon the built-in URL capability and use only CONCAT to create the desired A HREF tag. Search the forum for CONCAT to locate other examples.
|
|
Odoslať novú tému
Odpovedať na tému
|
|
|
|