Welcome Guest, Not a member yet? Register   Sign In
View theming
#1

Hi. How do I implement view theming?

Let's say a theme is a folder with templates.
PHP Code:
$theme 'classic'// get from some settings
return view($theme .'/users/profile'); 

What can I do to avoid duplicating this prefix in every method of every controller?
Reply
#2

use $this property and define in initController(RequestInterface $request, ResponseInterface $response, LoggerInterface $logger)
Reply
#3

(02-14-2023, 10:01 PM)UchihaSV Wrote: use $this property and define in initController(RequestInterface $request, ResponseInterface $response, LoggerInterface $logger)

In BaseController class?
Reply
#4

(02-15-2023, 10:39 AM)Mni.day Wrote:
(02-14-2023, 10:01 PM)UchihaSV Wrote: use $this property and define in initController(RequestInterface $request, ResponseInterface $response, LoggerInterface $logger)

In BaseController class?

yes
Reply




Theme © iAndrew 2016 - Forum software by © MyBB