public function actionUpdate($id)
    {
        $model = $this->findModel($id);
		$model->tags = !empty($model->tags)?explode(",",$model->tags):[];
		
		$post = Yii::$app->request->post();
		if (isset($post['StaticPage']['tags']))
		{
			if (is_array($post['StaticPage']['tags']))
			{
				$post['StaticPage']['tags'] = implode(",",$post['StaticPage']['tags']);
			}	
		}
		
        if ($model->load($post) && $model->save()) {
            return $this->redirect(['view', 'id' => $model->id]);
        } else {
            return $this->render('update', [
                'model' => $model,
            ]);
        }
    }