Call handle in different component

zoid
Member | 12
+
0
-

Hello,

I have a component, let's say Editor and I am creating 2 Datagrids in it. I would like to make a link to handle in Editor component from the Datagrid template. If it was presenter I would just use plink macro, but how to do it in this case?

Thanks for any advices.

zoid
Member | 12
+
0
-

Solved via

{$control->getParent()->link('...')}

I will let this open for maybe a better solution or some explanation of linking in subcomponents?

newPOPE
Member | 648
+
0
-

Hi,

it depends what you want.
You can make link to self (component) or subcomponent via n:href="someSelfHandle" or n:href="Subcomponent:someHandle".
Macro {plink ...} starts with actual presenter (module when starts :Module:Presenter...) I think. For example {plink SomePresenter:someComponent:someSubcomponent}

zoid
Member | 12
+
0
-

I want to call parent's component handle.

Seems like {plink :Module:Presenter:Component:handle} is the correct way since it's in the same presenter.

Thanks for advice.

Last edited by zoid (2017-07-19 09:06)