Re: Element Link (SOLVED)
Ok, I post the finish code and comment to insert data for personalize this template.
Link the data for view page of component
1) Create a new.html template
2) Copy into this code
Code:
<mos:comment>
@version 4.5.2
@package fabrik
@copyright (C) 2005 Rob Clayburn
@license [url]http://www.gnu.org/copyleft/gpl.html[/url] GNU/GPL
</mos:comment>
<h1>{LABEL}</h1>
<p>{INTRODUCTION}</p>
<form action="{FABRIK_PAGEURL}" method="post" id="fabriktable" name="fabriktable">
<mos:tmpl name="show-add" type="simplecondition" requiredvars="showAdd=1">
<span class="pagenav">
<a href="{ADDRECORDLINK}">Add Listing</a>
</span>
</mos:tmpl>
<mos:tmpl name="show-csv" type="simplecondition" requiredvars="showCSV=1">
<span class="pagenav">
<a href="{CSVLINK}">Export to CVS</a>
</span>
</mos:tmpl>
<mos:tmpl name="show-rsslink" type="simplecondition" requiredvars="showRSS=1">
<span class="pagenav">
<a href="{RSSLINK}">Subscribe RSS</a>
</span>
</mos:tmpl>
<mos:tmpl name="show-filters" type="simplecondition" requiredvars="showfilters=1">
<table class="filtertable" style="float:right;width:200px;border:1px solid #cccccc;" cellpadding="5" cellspacing="0">
<tr style="background-color:#cccccc;font-weight:bold;">
<th colspan="2" style="text-align:left">Search:</th>
</tr>
<mos:tmpl name="filters">
<tr>
<td>{NAME}</td>
<td style="text-align:right;">{VALUE}</td>
</tr>
</mos:tmpl>
<tr>
<td colspan="2" style="text-align:right;">
<mos:tmpl name="filter-form" type="simplecondition" requiredvars="filterform=1">
<input type="button" onclick="submitfabrikTable('filter')" class="button" value="Go" name="filter" />
</mos:tmpl>
</td>
</tr>
</table>
</mos:tmpl>
<br style="clear:both;" />
<br />
<mos:tmpl name="named-groups" type="condition" conditionvar="rowcount">
<mos:sub condition="0">
{EMPTY_DATA_MSG}
</mos:sub>
<mos:sub condition="__default">
<table width="100%" style="width:100%;border:1px solid #cccccc;" cellpadding="5" cellspacing="0" class="mfDataTable">
<tr style="background-color:#cccccc;font-weight:bold;">
<th align="left">labelfieldname1</th>
<th align="left">labelfieldname1</th>
<th align="left">labelfieldname1</th>
<th align="left">Link </th>
</tr>
<mos:tmpl name="named-rows">
<tr>
<td><mos:var name="jos_tablename.fieldname1" /></td>
<td><mos:var name="jos_tablename.fieldname2" /></td>
<td><mos:var name="jos_tablename.fieldname3" /></td>
<td><a target="_blank" href="/pathtocomponents/id,<mos:var name="jos_tablename.id" />">Link</a></td>
</tr>
</mos:tmpl>
</table>
</mos:sub>
</mos:tmpl>
<div style="text-align:center;margin:auto;">
{FABRIK_DELETEBUTTON}
{FABRIK_PAGENAV}
</div>
<mos:tmpl name="hidden-fields">
<input type="hidden" name="{NAME}" value="{VALUE}" id="{ID}" />
</mos:tmpl>
</form>
<mos:comment>
<mos:var name="fabrik_templatevars" />
</mos:comment>
at the code
<th align="left">labelfieldname1</th>
<th align="left">labelfieldname2</th>
<th align="left">labelfieldname3</th>
<th align="left">Link </th>
change for your LABEL
at the code
<td><mos:var name="jos_tablename.fieldname1" /></td>
<td><mos:var name="jos_tablename.fieldname2" /></td>
<td><mos:var name="jos_tablename.fieldname3" /></td>
change with your element of table
for this code
<td><a target="_blank" href="/pathtocomponents/id,<mos:var name="jos_tablename.id" />">Link</a></td>
copy your path to components
for id use the id element of your table
for tablename use your table of components
This link run in _blank page if you prefer display in same window delete target="_blank" in <a target="_blank" href...>
be Happy! I'm Happy!
alan