Actions

Translations

New Template System in LS3.x/20/es: Difference between revisions

From LimeSurvey Manual

No edit summary
No edit summary
 
Line 1: Line 1:
<div class="simplebox"> [[File:help.png]] Si tiene curiosidad por saber qué hace esta función, puede encontrarlo en el código aquí (versión de RC3): [https://github.com/LimeSurvey/LimeSurvey/blob/f3737a75e428f604d68d2e5ba958f3eba3eba2e1 /application/core/LS_Twig_Extension.php#L219-L237 función image( ) en RC3]
<div class="simplebox"> [[File:help.png]] Si tiene curiosidad por saber qué hace esta función, puede encontrarla en el código aquí (versión de RC3): [https://github.com/LimeSurvey/LimeSurvey/blob/f3737a75e428f604d68d2e5ba958f3eba3eba2e1 /application/core/LS_Twig_Extension.php#L219-L237 función image( ) en RC3]
Si no entiende el código: no se preocupe, no necesita saber cómo funciona, pero si, por qué usarlo y cómo usarlo.
Si no entiende el código: no se preocupe, no necesita saber cómo funciona, pero si, por qué usarlo y cómo usarlo.
</div>
</div>

Latest revision as of 18:53, 20 November 2019

Message definition (New Template System in LS3.x)
<div class="simplebox">[[File:help.png]]  If you’re curious to know what it does, you can find it in the code here (version of RC3): [https://github.com/LimeSurvey/LimeSurvey/blob/f3737a75e428f604d68d2e5ba958f3eba3eba2e1/application/core/LS_Twig_Extension.php#L219-L237 image() function in RC3]
If you don’t understand the code: don’t worry, you don’t need to know how it works, but why to use it and how to use it.
</div>
<br>
You should use the function image() for two reasons:
* The function image loops through the theme to find the image. If the theme you’re working on is extended to another theme, and if you copy the file to where you inserted the picture locally, but that picture is not copied in the local theme, it will loop through the theme inheritance tree to find where that picture is.
* It will use the asset manager, so it will improve the performance of your theme. See the Yii Asset Manager documentation for more information about it: http://www.yiiframework.com/wiki/148/understanding-assets/
Si tiene curiosidad por saber qué hace esta función, puede encontrarla en el código aquí (versión de RC3): /application/core/LS_Twig_Extension.php#L219-L237 función image( ) en RC3

Si no entiende el código: no se preocupe, no necesita saber cómo funciona, pero si, por qué usarlo y cómo usarlo.


Debe usar la función image( ) por dos razones:

  • La función de imagen recorre el tema para encontrar la imagen. Si el tema en el que está trabajando se extiende a otro tema, y si copia el archivo donde insertó la imagen localmente, pero esa imagen no se copia en el tema local, recorrerá el árbol de herencia del tema para encontrar dónde está esa imagen .
  • Utilizará el administrador de activos, por lo que mejorará el rendimiento de su tema. Consulte la documentación de Yii Asset Manager para obtener más información al respecto: http://www.yiiframework.com/wiki/148/understanding-assets/