sn00ze
New Member
Ok, this is driving me nuts and I'm sure someone here will just go "you forgot the semi colon" or something and I can sleep at night once more..
So, in an attempt to make the entire list row the link to the items details and not the magnifying glass button, I have been editing default_row.php
The issue is $this->_row->data->fabrik_view_url is not coming through to the browser... its hard to explain... I look at the source HTML and its there as expected ... but if I 'inspect element' in browser, the string is empty and of course the link doesnt work.
Here's the code. There's not much to it. you can see I've tried a few things with the var $click and urlencode. no joy
ps.
var_dump($click) gives
string(72) "/index.php?option=com_fabrik&view=details&formid=5&rowid=132"
in view source which is whats expected... but when I inspect element I get string(0) ""
weird huh?!
So, in an attempt to make the entire list row the link to the items details and not the magnifying glass button, I have been editing default_row.php
The issue is $this->_row->data->fabrik_view_url is not coming through to the browser... its hard to explain... I look at the source HTML and its there as expected ... but if I 'inspect element' in browser, the string is empty and of course the link doesnt work.
Here's the code. There's not much to it. you can see I've tried a few things with the var $click and urlencode. no joy
PHP:
<?php
/**
* Fabrik List Template: Admin Row
*
* @package Joomla
* @subpackage Fabrik
* @copyright Copyright (C) 2005-2013 fabrikar.com - All rights reserved.
* @license GNU/GPL http://www.gnu.org/copyleft/gpl.html
*/
// No direct access
defined('_JEXEC') or die('Restricted access');
//$click = $this->_row->data->slug;
//$click = $this->_row->data->fabrik_view_url;
$click = '/index.php?option=com_fabrik&view=details&formid=5&rowid=' . urlencode($this->_row->data->slug);
?>
<tr style="cursor:pointer" id="<?php echo $this->_row->id;?>" class="<?php echo $this->_row->class;?>" onclick="document.location='<?php echo $click; ?>';" >
<?php $i = 0;
foreach ($this->headings as $heading => $label) {
$style = empty($this->cellClass[$heading]['style']) ? '' : 'style="'.$this->cellClass[$heading]['style'].'"';
if ($i == 0){
?>
<?php } else {?>
<td class="<?php echo $this->cellClass[$heading]['class']?>" <?php echo $style?>>
<?php echo @$this->_row->data->$heading;?>
</td>
<?php } $i++;}?>
</tr>
ps.
var_dump($click) gives
string(72) "/index.php?option=com_fabrik&view=details&formid=5&rowid=132"
in view source which is whats expected... but when I inspect element I get string(0) ""
weird huh?!