Platon Technologies
neprihlásený Prihlásiť Registrácia
SlovakEnglish
open source software development oslavujeme 10 rokov vývoja otvoreného softvéru! Streda, 25. november 2026
O nás
Magazín
Otvorený softvér
CVS
Služby
Index  »  Projekty  »  phpMyEdit  »  Fórum  »  URL link in different field

phpMyEdit General     URL link in different field
Odoslať novú tému   Odpovedať na tému    
 
myksa     Založený: 16.10.2007   Príspevky: 14  
Príspevok Zaslal: 2008-02-22 15:43
Návrat hore  Odpovedať s citátom     

Hello

Is there a way to show URL link in different field? For example:

- ID
- URL

I want to show only ID field which would be a link with specyfied URL:

<a href="URL">ID</a>

Of course, if there isn't any url, only ID would be shown.


Naposledy upravil myksa dňa 2008-03-04 10:06, celkom upravené 2 krát

 
myksa     Založený: 16.10.2007   Príspevky: 14  
Príspevok Zaslal: 2008-02-28 08:31
Návrat hore  Odpovedať s citátom     

Hello

Your advice was good - search for concat.
So I found and after writing these two lines everything works now:
Kód:

  'escape'   => false,
  'sql|LF'   => 'if(view = "yes", CONCAT("<a href=\"asdf.php?id=", id, "\">", id, "</a>"), id)'

So now I have linked ID when view field is set to yes, and only text otherwise.

Thanks for help!

 
myksa     Založený: 16.10.2007   Príspevky: 14  
Príspevok Zaslal: 2008-03-04 09:47
Návrat hore  Odpovedať s citátom     

Unfortunately that's not a perfect solution, because I'm linking my primary key column. When I'm trying to change/view/delete/copy record, nothing displays, because in change/view/delete/copy URL uses value with URL (record isn't found).

Is there a way to fix this?

 
michal     Založený: 17.06.2003   Príspevky: 537   Bydlisko: Slovakia
Príspevok Zaslal: 2008-03-12 11:04
Návrat hore  Odpovedať s citátom     

if you want to use the primary value, it is possible to use $key

http://opensource.platon.sk/projects/doc.php/phpMyEdit/html/configuration.url-linking.html

 
Odoslať novú tému   Odpovedať na tému    

Copyright © 2002-2006 Platon Group
Stránka používa redakčný systém Metafox
Na začiatok · Odkazový formulár · Prihláška
Upozorniť na chybu na PLATON.SK webstránke · Podmienky použitia · Ochrana osobných údajov