S
S
Sergey2017-06-19 14:58:07
Yii
Sergey, 2017-06-19 14:58:07

How to get field value from Yii 1 admin?

In the admin panel of the site on Yii 1, I added an additional attribute to the data type - a text field.
gmvYpWjSp533ra.png
Now I can't get its value in the template, because I don't know where it is written. The neighboring field with the address of the images is obtained using $model->ext['images']['original'], but the value I need is not in the ext array. I can't do print_r($modules), the script execution hits the max_execution_time = 60 limit, which cannot be overridden on the hosting.
Maybe someone knows how I can get the value of this field in the template?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
B
Boris Korobkov, 2017-06-19
@BorisKorobkov

This is not a Yii admin panel, but some kind of Yii CMS. Read the documentation for your CMS.

M
Maxim Timofeev, 2017-06-19
@webinar

yii is a tool for creating cms. Apparently your cms is created on yii. The logic of its work is known only to the developer. You can look at the code and figure out what, where and where, but nothing can be said from your picture.
What are your options:
- study yii and figure it out
- find a specialist and give access, he will figure it out
- ask your question to the developer of this cms
In addition, it is not clear why you are doing it print_r($modules), I understand it is necessaryprint_r($model->ext)
What is the template for you? yii is built on the principle of mcv and perhaps you are talking about views? If so, then there is a controller and an action in it that renders this view and passes data to it, respectively, and you can see what is passed to the view there.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question