drewroberts / blog

📝 Laravel package for my opinionated style of adding blog posts to Laravel projects
MIT License
2 stars 4 forks source link

Layout #60

Open drewroberts opened 3 years ago

drewroberts commented 3 years ago

There should be a model named Layout that is used in a somewhat similar concept to WordPress' page layouts:

The Layout should define a model like Page (#15) or Market (https://github.com/tipoff/locations/issues/41) and then define a blade file. The model can then have a belongsTo relationship with Layout and there can be a default set by the package in the config file for each model of that package that will be included in web routes. That blade template can be published and updated in the application and other variations could also be created both in the package and in the application (example: AMP validated layouts). Each entry in that model can then use the default layout or define its own.

drewroberts commented 3 years ago

@pdbreen These are really Single-Page Layouts, should I change the name to Template instead of Layout to avoid confusion in the terminology?

pdbreen commented 3 years ago

@drewroberts i think layout is fine, but really have no strong opinion towards one vs the other.