This topic is locked
[SOLVED]

 add link to each row in _list.php page

10/11/2008 7:09:49 PM
PHPRunner General questions
M
marktaylor5151 author

i have a list page called store_locations_list.php
the db field names are

id

store_id

storename

etc
on the list page in the current row as is displays all the records one per row, i want to insert the store_id field into a html link. I want this link to appear on each of the rows with the store_id for that row inserted as a paramenter for that link.
e.g.
<a href="anotherfile.php?store=<insert store_id field value>"></a>
but i cant figure it out, i tried something using the 'List page: after record processed' event:
store_locations_snippet1($data["store_id"]);
then on the list page created a php snippet named store_locations_snippet1(&$params)
and then in the snippet just tried to do an echo or a print_r($params). It displayed the values but it did so at the top of the page and now within the actual each of the rows.
Is there a way to do this, as i dont realyl know.
Thanks in advance.
Mark Taylor

J
Jane 10/13/2008

Hi,
here are some tips:

  1. add new List page: After record processed event on the Events tab.

    Here is a sample:
    $row["store_id"] =$data["store_id"];


2. use following code on the Visual Editor tab.

<a href="anotherfile.php?store={$row.store_id}"></a>