Jump to content

zoeck

Members
  • Posts

    382
  • Joined

  • Last visited

  • Days Won

    2

Posts posted by zoeck

  1. On 1/10/2023 at 10:27 AM, bernhard said:

    It's just the missing renderIf() or early exit feature that I lose when using {include ...}. But using {include ...} is necessary to get a meaningful latte panel.

    Looks like there is an exitIf node now 😉
    But it seems there will be no include with condition and only one template 😞 

    {if $foo == 'bar'}{include 'somefile.latte'}{/if}

     

    • Like 1
  2. 55 minutes ago, bernhard said:

    I could use {include ...} instead of $rockfrontend->render(...), but the non-existing early exit is really a show-stopper for me. Do you have any other approach to that?

    I honestly haven't even been thinking about it, but I actually had a case where I used this - without "renderIf".
    But this is actually more of a workaround, as I simply include an empty latte file (the "blank.latte" file is displayed in the Tracy Panel)

    {include $pages->find("template=test")->count() ? "test.latte" : "blank.latte"}

    I think that is "a bit renderIf" in latte syntax 😉 
    Two templates have to be specified at all times, otherwise an error will be displayed.
    It would be very cool if it would also work with a single template...

    1 hour ago, bernhard said:

    but I was asking for benefits other than that?

    I think currently you only have this benefit 😄 

    • Like 1
  3. 10 hours ago, bernhard said:

    What are actually the benefits other than to get a list of rendered latte files?

    The panel is quite interesting if you have a latte project, with layouts, different sections etc. - This makes it easy to see which files are being used.

    I think I use RockFrontent differently than you do 😄 
    Actually, I mainly use the standard functions of Latte as described in the documentation, without "extensions" of RockFrontend (But I use the styles/script functions 😉).

    Of course, this may also have something to do with the fact that I'm still using latte for the first project.

    What real drawbacks do you see in the panel? Apart from the fact that it doesn't fit so well with your workflow

    I think I need to take a closer look at the panel again

  4. Hello @bernhard,

    as posted in the other thread, I tried adding the Latte Tracy Bar to RockFrontend.

    Just Added this to the RockFrontend.module.php:

    // Top of the Module add the LattePanel Class
    use Latte\Bridges\Tracy\LattePanel;

     

    // Add inside the "protected function renderFileLatte($file, $vars)"
    // After "$latte = new Engine();" add this to initialize the LattePanel
    
    if($this->modules->isInstalled("TracyDebugger"))		
    	LattePanel::initialize($latte);

    After that you have the LattePanel in Tracy 😉 

    latte.png.d5096a23c0f9d187c6b0bf25d13cd609.png

    I have not been able to detect any problems so far.

    • Like 1
    • Thanks 1
  5. <div id="content">
        <?php
        // get all children as $child
        foreach($page->children() as $child)
        {
           // get all images and output the single images 
           foreach($child->get('images') as $image)
           {
              $thumb = $image->width(250);
              ?>
              <div class='favs'>
                  <a href='<?=$image->url?>' data-uk-lightbox="image">
                      <img src='<?=$thumb->url?>' alt='<?=$child->title?>'>
                  </a>
                  <div class='text-favs'>
                      <span><?=$child->title?></span>
                  </div>
              </div>
        <?php
           }
        }
        ?>
    </div>

    Something like this 😉 I think you should have another look at the php foreach function how it works 😉 

    • Like 3
  6. Happy new year 😉 

    and another rockfrontend question 😄 

    I saw this information in the Latte documentation: https://latte.nette.org/en/develop#toc-debugging-and-tracy

    Is there an easy way to use this with the Tracy debugger and RockFrontend module?
    is it possible to add it here? https://github.com/baumrock/RockFrontend/blob/c7ac651f198f6470710b814ec50530b71dcfafb2/RockFrontend.module.php#L1443


    When the templates get a bit bigger and more nested, that's definitely interesting 😉 

  7. 38 minutes ago, Frank Schneider said:

    But I'm looking for an editor where you don't have to edit the HTML code. I'm looking for an editor like a CMS.

    CMS is the wrong word for it - you mean "WYSIWYG Editor" or "Pagebuilder" (CMS = Content MANAGEMENT System)

    I think if you don't want to write HTML (or PHP), then Processwire is not the best choice for you.

    • Like 3
  8. 1 hour ago, Heinz said:

    The user has to be logged in to the admin part of PW to create a new page as a child of an other page just
    to enter some info ? 

    You can also create a form in the frontend, but then you have to "build" it yourself.

    Or you can use the paid module "FormBuilder", with which you can "build" your own forms in the admin and also create new pages via these forms (in the frontend).

    There isn't just one way of doing it 😉 

    • Like 1
×
×
  • Create New...