Why did you drop partials

This is one of the most important things!!! Why did you drop it?

Which version are you using? I have the WP version and I still see:

  • Global Smart Actions -> Reusable Template Part
  • Template Parts -> Define Template Part
  • Template Parts -> Include Template Part

Also, you can easily create one and manually insert the code.

@Tintin can you please tell me more about how you (would) use partials?

I’m thinking about bringing them back but would like to get the features and usability right.

@dcneuts this refers to “Open as Partial” feature http://docsbeta.pinegrow.com/working-with-partials/

Thanks for the clarification on this. Partials are a big deal in a PHP and WP environment, so I’m also going to wait for an answer out of curiosity on this one. I’m all for strengthening PHP-based operations.

I use PG for Laravel projects and I set the PG project folder to Laravels “resources” directory.
I always disable PG’s backups because I use Git versioning.

I create a folder where I have my master design pages
Example:
./Resources/views/pinegrow/front.html
./Resources/views/pinegrow/admin.html

When they are ready I split them into multiple partials
LAYOUTS are where I attach the STYLES and JS.
They only contain the header, and body.
Example
./Resources/views/layouts/front.blade.php
./Resources/views/layouts/admin.blade.php

Another folder will contain partials:
Example:
./Resources/views/partials/front/top-menu.blade.php
./Resources/views/partials/admin/left-menu.blade.php

One folder will contain blade reusable components
Example
./Resources/views/components/forms/input.blade.php
./Resources/views/components/forms/wrapper.blade.php
./Resources/views/components/forms/buttons.blade.php
./Resources/views/components/datatable.blade.php

I can go on, but I think you get the picture.
After the initial design phase, all partials would be opened in a LAYOUT file.
This is the key to be able to use Pinegrow. If I cannot open the partials in a layout file, I have to attach a style sheet to every partial, which I manually have to remember to remove, every time I save it …

(I attach style.css from Laravels css folder and app.css from the public folder and use npm to watch for changes)

At the moment I solved this by having a master template in the “pinegrow” folder that I duplicate when I want to make a new partial, then I define the section I want to use in Laravel as a partial and export it to the correct folder.

If you don’t want to reimplement the “open as partial…” feature, you could add a new css/js feature to be able to define css and js files as “design time only” so they never are attached in the code. That would cover the basic needs.
In some cases where you work with more detailed partials, like a menu bar or input field component, I still miss the “open as partial …” feature.

I actually stopped using PineGrow with Laravel when this feature was dropped but started to use it again because PG plays very nice with Laravel 7 new blade component syntax.
https://laravel.com/docs/7.x/blade#displaying-components

1 Like

Wow, you’re really in the weeds, I can see how this is important… never actually thought about using this with the Laravel framework. Makes sense, though. Let’s see if there’s any feedback from Pinegrow on this topic.

@Tintin Thank you… partials! what an excellent way to integrate Laravel with PG! I have been researching how to create a simple way (plugin?) to parse and ignore Laravel Blade directives, control structures and convert routes and links.

(no relation to DJ Tintin? eh? cheers)

In function what is the difference between partials and component items?