[TYPO3-project-formidable] add current record id to link ..
Asbjørn Morell
atmorell at gmail.com
Fri May 18 16:51:04 CEST 2007
Hi,
1.
How do I add the current uid to an url edit link? I was trying to do it with
<onclick ...> however I need to init. 2 new xml list forms, and from what I
cold see this->_oParent->oForm->_forceEntryId ... reloads the current xml
form, and that is not what I am trying to do.
<renderlet:LINK name="mylink" label="singleView">
<url>
<userobj>
<php><![CDATA[
$uid = "" //here I need help finding the uid.
return t3lib_div::locationHeaderUrl(
$this->_oParent->pi_getPageLink(
$GLOBALS["TSFE"]->id,
"",
array(
"do" => singleView,
"uid" => $uid
)
)
);
]]></php>
</userobj>
</url>
</renderlet:LINK>
2.
When I load a list form like this:
$this->oSingle->init(
&$this,
t3lib_extmgm::extPath($this->extKey) . "pi1/xml/art_single_view.xml", 6
);
I get all records from the table but id 6 is higlighted . How do I force
formidable to only load id 6? (for a list)
main pi1 file::
$do = t3lib_div::_GP('do');
$uid = t3lib_div::_GP('uid');
switch($do) {
case 'singleView': //singleview
$this->oSingle = t3lib_div::makeInstance("tx_ameosformidable");
$this->oSingle->init(
&$this,
t3lib_extmgm::extPath($this->extKey) . "pi1/xml/art_single_view.xml",
);
$content .= $this->oSingle->render();
//
//here comes images from another table ..
//
return $this->pi_wrapInBaseClass($content);
break;
default: //list and form
$this->oForm = t3lib_div::makeInstance("tx_ameosformidable");
$this->oForm->init(
&$this,
t3lib_extmgm::extPath($this->extKey) . "pi1/xml/art.xml"
);
$content = $this->oForm->render();
$this->oList = t3lib_div::makeInstance("tx_ameosformidable");
$this->oList->init(
&$this,
t3lib_extmgm::extPath($this->extKey) . "pi1/xml/art_list.xml"
);
$content .= $this->oList->render();
return $this->pi_wrapInBaseClass($content);
break;
}
}
Best regards.
Asbjørn Morell.
More information about the TYPO3-project-formidable
mailing list