Re: [Vaisoco] Page link in the admin
Hi,
Since the _link variable is not actually a database field, but a variable that's created when you use the getRecords function, you can't display it directly in the "edit" page of a record. However, there's a work around.
If you know the name of the file that they're using to display details (details.php for this example) and you know the field that they store the name of the record in (title in this example), you can use a separator to display this information.
Add a separator field, make sure that you select the "HTML" radio button.
In the text box below that, put the following code:
<tr>
<td>
link:
</td>
<td>
details.php?<?php
echo str_replace(" ","-",$record['title'])."-".$record['num'];
?>
</td>
</tr>
This will display in the admin section as the link for details.php, it will replace all the spaces in the title with a "-" and append the record number to the end of the link.
So, for example, if the product was called "my new product" and had a record number of 3, this is what will be displayed:
details.php?my-new-product-3
It's important that the record number appear at the end of the query string.
Give it a try and let me know if you run into any issues.
Hope this helps.
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com
Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/