I wonder if some one know how to assign some template for route.
I was try that:
Code: Select all
$this->RegisterRoute('@some/place/(?P<paramname>.*?)$@', array('action'=>'custom_action', 'showtemplate='=>'NotDefaultTemplate'));
Code: Select all
$this->RegisterRoute('@some/place/(?P<paramname>.*?)$@', array('action'=>'custom_action', 'showtemplate='=>'NotDefaultTemplate'));
Code: Select all
$this->RegisterRoute('@some/place/(?P<paramname>.*?)$@', array('action'=>'custom_action', 'mytemplate='=>'NotDefaultTemplate'));
Thx for the fast answer!calguy1000 wrote: Assuming your action understood the 'mytemplate' parameter (and you had set it's type with SetParameterType... you could use:
Code: Select all
$this->RegisterRoute('@some/place/(?P<paramname>.*?)$@', array('action'=>'custom_action', 'mytemplate='=>'NotDefaultTemplate'));
Code: Select all
$content_obj = $gCms->variables['content_obj'];
$content_obj->LoadFromId(63);
Code: Select all
</__body>
<!-- start content -->
Code: Select all
</__body>
<!-- start content -->
His answer has no sense for me, cause even if I got NotDefaultTemplate variable with template name in my action, I still not know how to ask system use template with that name when out page {content} blockJos wrote:I guess you should read Calguy's post more carefully
Code: Select all
$this->RegisterRoute('@some/place/(?P<paramname>.*?)$@', array('action'=>'custom_action', 'showtemplate' => 'false'));