add a default view with layout that can be extends by view in module #58
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Add View Layout
Instead of editing display_view that cause incompatibility with other site (#57), add a default view that use layout (https://www.codeigniter.com/user_guide/outgoing/view_layouts.html) and must be extended by the views in modules. This change permits to use the view function of CodeIgniter that return a string and permits to have a view with a different header without rewrite all the head.
Example
default.php
The default view with renderSection that will be replaced by what you want when you extend this view. The default view is like an abstract class, it is not supposed to be used without extends
Note
I put the content of the head in head_content.php to have the same thing between the current header.php and this default view without duplicate the code.
edit_planning.php
The edit planning view extends the default view and defines a section that will be inserted in the default view. There are no error if all sections are not be defined, it is just replaced by nothing.
Note
<style>
and ends with</style>
.<script>
and ends with</script>
.Call
Use the view function of CodeIgniter.
All part will be renderer.
![image](https://private-user-images.githubusercontent.com/24254885/253273956-f1db7491-f3ac-4ca3-b073-e9a2ab4142a7.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjA5MjQ5NDYsIm5iZiI6MTcyMDkyNDY0NiwicGF0aCI6Ii8yNDI1NDg4NS8yNTMyNzM5NTYtZjFkYjc0OTEtZjNhYy00Y2EzLWIwNzMtZTlhMmFiNDE0MmE3LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA3MTQlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNzE0VDAyMzcyNlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWM4MTBjMjZjYzFmM2IxZjY0NTliZjgyNjM1NzA1YmRjMjc1ZjczYzBlMjI1ZTBlOGRjYmY0YmQxNGRlYjc2NTEmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.oo8dkOxOeKXfbDpGpwywWRX4JOK6VAv_eHgZKdVgFpE)