[TYPO3-project-formidable] hide/disable {link_delete} tag from tempelte doing runetime.
Asbjørn Morell
atmorell at gmail.com
Tue May 22 01:03:30 CEST 2007
I found a way of doing it.
I modified my template like this:
<td><a href = "{link_delete}">delete</a></td>
to
<td>{link_delete}</td>
I found another function in the TYPO3 api that generates a complete linke:
function _populateArtLinkEdit($aParams, &$oForm)
{
if ($GLOBALS["TSFE"]->fe_user->user[uid] ==
$aParams[row][cruser_id]) {
return ($this->pi_linkToPage("edit", $GLOBALS["TSFE"]->id,
"",
array("do" => artEdit,
"uid" => $aParams['row']['uid']
)
)
);
}
}
Now I don't get delete and edit buttoms if my customtag function don't find
a match.
Regards.
Asbjørn Morell.
"Asbjørn Morell" <atmorell at gmail.com> wrote in message
news:mailman.1.1179773568.11409.typo3-project-formidable at lists.netfielders.de...
> Hello,
>
> I am trying to use the same listing form for normal view and auther mode.
> This is a part of my template:
>
> <!-- ###ROW1### begin-->
> <tr class="row1">
> <td>{title}</td>
> <td>{image}</td>
> <td><a href = "{link_delete}">delete</a></td>
> </tr>
> <!-- ###ROW1### end-->
>
> I need to hide/remove the {link_delete} if a fe_user does not own this
> record. The link_delete is generated from a custom tag:
>
> <customtags>
>
> <tag_link_delete>
> <name>link_delete</name>
> <value>
> <userobj>
> <extension>this</extension>
> <method>_populateArtLinkDelete</method> //this function checks
> permissions and returns an url if access is granted.
> </userobj>
> </value>
> </tag_link_delete>
>
> </customtags>
>
>
>
> Best regards.
> Asbjørn Morell.
More information about the TYPO3-project-formidable
mailing list