Jump to content

kmergen

Members
  • Posts

    3
  • Joined

  • Last visited

kmergen's Achievements

Newbie

Newbie (2/6)

0

Reputation

  1. Thanks for your answer. Now I delete the field from my template and delete the module. I install it again and clear the cache. Add the cropImage to my template and now it works. I don't know where the issue come before. Hope it works now further.
  2. I worked with pw 2.4 and have install the thumnails module. When I added the cropImage to my page template and upload an image I get an error: There is no thumb called. I read other topics about this error but I cannot resolve it in my template. If I use the image fieldtype with the input type cropImage it works but not when I use the fieldtype cropImage with input type cropImage. I read in other topics to delete the cache. I do this by delete the files in the cache folder. Is there a UI command to do this.
  3. I am new here in pw and I think a template approach with output buffering is very useful. I use yii for other projects and want to use a cms too for some projects. Templating with output buffer is done in yii and other frameworks. The big advantage is that you can write clear template files with html and php echos since php 5.4 always with the short echo tags. The performance of output buffering in php is also very good. The simplest way to do this: _init.php (The prepended config file) <?php /** * The prepended file for all template files * * It buffers the output and after rendering all outputs and view Files the buffer will keep in the $content variable * and this content variable will decorated by the main layout file. */ ob_start(); ob_implicit_flush(false); /** * Renders a view file as a PHP script. * * This method treats the view file as a PHP script and includes the file. * It extracts the given parameters and makes them available in the view file. * * @params string $viewFile the view file. * @param array $params the parameters (name-value pairs) that will be extracted and made available in the view file. * @return void */ function render($viewFile, $params = []) { extract($params, EXTR_OVERWRITE); require('views/' . $viewFile . '.php'); } _out.php (the appended template file) <?php /* * Now the content is complete and we can output the content * with the decorated layout file. */ $content = ob_get_clean(); include('layouts/main.php');
×
×
  • Create New...