function content_6605f65b53b109_67548751 (Smarty_Internal_Template $_smarty_tpl) { if (!is_callable('smarty_function_myurl')) require_once '/data/wwwroot/hwcms_demo/vendor/smarty/smarty/libs/plugins/function.myurl.php'; if (!is_callable('smarty_modifier_date_format')) require_once '/data/wwwroot/hwcms_demo/vendor/smarty/smarty/libs/plugins/modifier.date_format.php'; $_smarty_tpl->_subTemplateRender("file:../layouts/pc/header_jp.html", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, $_smarty_tpl->cache_lifetime, array(), 0, false); ?> <meta name="twitter:widgets:theme" content="dark"> <meta name="twitter:card" content="summary_large_image" /> <meta name="twitter:site" content="@nytimes" /> <meta name="twitter:title" content="<?php echo $_smarty_tpl->tpl_vars['content']->value['extend']['twitter_title'];?> " /> <meta name="twitter:description" content="<?php echo $_smarty_tpl->tpl_vars['content']->value['extend']['twitter_description'];?> " /> <meta name="twitter:url" content="https://herogame.com/jp<?php echo $_smarty_tpl->tpl_vars['content']->value['extend']['twitter_link'];?> "> <meta name="twitter:image" content="https:<?php echo $_smarty_tpl->tpl_vars['content']->value['extend']['twitter_image'];?> " /> <?php $_smarty_tpl->_subTemplateRender("file:../layouts/pc/body_jp.html", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, $_smarty_tpl->cache_lifetime, array(), 0, false); ?>
$_smarty_tpl->_subTemplateRender("file:../layouts/pc/header_jp.html", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, $_smarty_tpl->cache_lifetime, array(), 0, false); ?> <meta name="twitter:widgets:theme" content="dark"> <meta name="twitter:card" content="summary_large_image" /> <meta name="twitter:site" content="@nytimes" /> <meta name="twitter:title" content="<?php echo $_smarty_tpl->tpl_vars['content']->value['extend']['twitter_title'];?> " /> <meta name="twitter:description" content="<?php echo $_smarty_tpl->tpl_vars['content']->value['extend']['twitter_description'];?> " /> <meta name="twitter:url" content="https://herogame.com/jp<?php echo $_smarty_tpl->tpl_vars['content']->value['extend']['twitter_link'];?> "> <meta name="twitter:image" content="https:<?php echo $_smarty_tpl->tpl_vars['content']->value['extend']['twitter_image'];?>
} if ($_template->startRenderCallbacks) { foreach ($_template->startRenderCallbacks as $callback) { call_user_func($callback, $_template); } } $unifunc($_template); foreach ($_template->endRenderCallbacks as $callback) { call_user_func($callback, $_template); } $_template->isRenderingCache = false; } catch (Exception $e) {
$_template->cached->file_dependency = array_merge($_template->cached->file_dependency, $this->file_dependency); } if ($_template->source->handler->uncompiled) { $_template->source->handler->renderUncompiled($_template->source, $_template); } else { $this->getRenderedTemplateCode($_template); } if ($_template->caching && $this->has_nocache_code) { $_template->cached->hashes[ $this->nocache_hash ] = true; } if ($_template->smarty->debugging) { $_template->smarty->_debug->end_render($_template);
} $this->cached->render($this, $no_output_filter); } else { if (!isset($this->compiled) || $this->compiled->compile_id !== $this->compile_id) { $this->loadCompiled(true); } $this->compiled->render($this); } // display or fetch if ($display) { if ($this->caching && $this->smarty->cache_modified_check) { $this->smarty->ext->_cacheModify->cacheModifiedCheck($this->cached, $this,
} ob_start(); $template->_mergeVars(); if (!empty(Smarty::$global_tpl_vars)) { $template->tpl_vars = array_merge(Smarty::$global_tpl_vars, $template->tpl_vars); } $result = $template->render(false, $function); $template->_cleanUp(); if ($saveVars) { $template->tpl_vars = $savedTplVars; $template->config_vars = $savedConfigVars; } else { if (!$function && !isset(Smarty_Internal_Template::$tplObjCache[ $template->templateId ])) {
* @throws Exception * @throws SmartyException * @return string rendered template output */ public function fetch($template = null, $cache_id = null, $compile_id = null, $parent = null) { $result = $this->_execute($template, $cache_id, $compile_id, $parent, 0); return $result === null ? ob_get_clean() : $result; } /** * displays a Smarty template *
// Make Yii params available as smarty config variables $template->config_vars = Yii::$app->params; $template->assign('app', \Yii::$app); $template->assign('this', $view); return $template->fetch(); } /** * Resolves Yii alias into file path * * @param string $type
if (isset($this->renderers[$ext])) { if (is_array($this->renderers[$ext]) || is_string($this->renderers[$ext])) { $this->renderers[$ext] = Yii::createObject($this->renderers[$ext]); } /* @var $renderer ViewRenderer */ $renderer = $this->renderers[$ext]; $output = $renderer->render($this, $viewFile, $params); } else { $output = $this->renderPhpFile($viewFile, $params); } $this->afterRender($viewFile, $params, $output); }
* @throws InvalidCallException if the view cannot be resolved. * @see renderFile() */ public function render($view, $params = [], $context = null) { $viewFile = $this->findViewFile($view, $context); return $this->renderFile($viewFile, $params, $context); } /** * Finds the view file based on the given view name. * @param string $view the view name or the path alias of the view file. Please refer to [[render()]] * on how to specify this parameter.
* @param array $params the parameters (name-value pairs) that should be made available in the view. * @return string the rendering result. * @throws InvalidParamException if the view file does not exist. */ public function renderPartial($view, $params = []) { return $this->getView()->render($view, $params, $this); } /** * Renders a view file. * @param string $file the view file to be rendered. This can be either a file path or a path alias. * @param array $params the parameters (name-value pairs) that should be made available in the view.
$website = Website::findOne($this->website_id); ob_start(); if ($type == 1) { echo parent::renderPartial($view, $params); } else { echo parent::render($view, $params); } $content = ob_get_contents(); ob_end_clean();
$lang = Cms::getSession('language'); if(!in_array($lang,\Yii::$app->params['lang'])) $lang = current(\Yii::$app->params['lang']); if($lang&& $lang!='en'){ $view = str_replace('.html','_'.$lang.'.html',$view); } return $this->_render(1, $view, $params, $category_id, $content_id); } }
} //详情页 public function actionDetail() { $data['content'] = $this->articleDetail(); return $this->renderPartial('detail.html', $data, 0, Cms::getGetValue('id')); } }
$args = $this->controller->bindActionParams($this, $params); Yii::trace('Running action: ' . get_class($this->controller) . '::' . $this->actionMethod . '()', __METHOD__); if (Yii::$app->requestedParams === null) { Yii::$app->requestedParams = $args; } return call_user_func_array([$this->controller, $this->actionMethod], $args); } }
} $result = null; if ($runAction && $this->beforeAction($action)) { // run the action $result = $action->runWithParams($params); $result = $this->afterAction($action, $result); // call afterAction on modules foreach ($modules as $module) { /* @var $module Module */
$parts = $this->createController($route); if (is_array($parts)) { /* @var $controller Controller */ list($controller, $actionID) = $parts; $oldController = Yii::$app->controller; Yii::$app->controller = $controller; $result = $controller->runAction($actionID, $params); if ($oldController !== null) { Yii::$app->controller = $oldController; } return $result; }
$params = $this->catchAll; unset($params[0]); } try { Yii::trace("Route requested: '$route'", __METHOD__); $this->requestedRoute = $route; $result = $this->runAction($route, $params); if ($result instanceof Response) { return $result; } else { $response = $this->getResponse(); if ($result !== null) { $response->data = $result;
try { $this->state = self::STATE_BEFORE_REQUEST; $this->trigger(self::EVENT_BEFORE_REQUEST); $this->state = self::STATE_HANDLING_REQUEST; $response = $this->handleRequest($this->getRequest()); $this->state = self::STATE_AFTER_REQUEST; $this->trigger(self::EVENT_AFTER_REQUEST); $this->state = self::STATE_SENDING_RESPONSE; $response->send();
} if($exit){ exit; } } (new yii\web\Application($config))->run();
$_GET = [ 'id' => '1175', ]; $_SESSION = [ '__flash' => [], 'channel_name' => 'pcgw', 'language' => 'jp', ];