Jump to content
  • 0

How To Use A Custom File Name Of The Template File?


ty0716

Question

3 answers to this question

Recommended Posts

  • 0

System default is to use controller.function.pdt file as template file.

 

 

But i want to use a other name's file。

 

for example: http://domain.com/client/main/edit     will use   views/default/client_main_edit.pdt  .  How to use a other name's file .eg: client_main_edit1.pdt  or client_main_edit2.pdt

 

 

you should client.php controller file , in the end of the function edit() you can add something like

 

$this->partial("client_main_edit2") ;

Link to comment
Share on other sites

  • 0

you should client.php controller file , in the end of the function edit() you can add something like

 

$this->partial("client_main_edit2") ;

          public function add() {
                if($department->id==2){
			$this->partial("client_tickets_addtest");
		}

why still show default template file ? 

Link to comment
Share on other sites

  • 0
          public function add() {
                if($department->id==2){
			$this->partial("client_tickets_addtest");
		}

why still show default template file ? 

 

 

 

what you mean by default template ? structure.pdt ? or client_main_edit.pdt ?

 

if you want to use a special structure view pdt file use this code

$this->structure_view = "your_new_structure_view";
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...