CodeIgniter 4 from Scratch - #8 - Views | View Layouts | Part 3/3

Поделиться
HTML-код
  • Опубликовано: 12 янв 2025

Комментарии • 31

  • @mariepgozzer
    @mariepgozzer 3 года назад

    I really thank you for these videos, they are so helpful.

  • @robrussell7455
    @robrussell7455 11 месяцев назад

    late to the party here...these are quite good, thanks for the vids. I assume that layouts can include view cells (e.g. referencing discrete header, footer files!)

  • @nanohetube
    @nanohetube Год назад

    l would like to appreciate for the great videos, thank you!

  • @codingjack
    @codingjack 3 года назад

    Awesome... Very helpful...

  • @sekfook97
    @sekfook97 4 года назад +2

    Hi Alex, your tutorial is super useful. Would be really appreciated if you can upload the source code of this series to youtube. Thank you so much

  • @szaboistvan369
    @szaboistvan369 4 года назад +1

    Hey Alex, What's the real benefit of using layouts over just views? Because for the benefit you mentioned, I could just create a render method in the BaseController, and could take care of the 3 echos in that method, which is actually superior, because then I can also do additional data passing or whatever at that level.

  • @drjonbear7517
    @drjonbear7517 11 месяцев назад

    These are great thanks! Is the finished project in a GH repo?

  • @fernandowabab6620
    @fernandowabab6620 4 года назад

    Nice tutorial, thanks you Alex

    • @AlexLancer
      @AlexLancer  4 года назад

      You're welcome, Fernando!

  • @outstyler
    @outstyler 2 года назад

    Very nice and useful ! What if we have queries from database in the footer ? how should be code this ? (eg: a widget in the footer that list the blog categories)
    Thank you Alex

    • @AlexLancer
      @AlexLancer  2 года назад +1

      Hey Matt, the query should be inside some method within some model.
      Then use view_cell to load that model and call the method

  • @muhammedsafeero
    @muhammedsafeero 3 года назад

    Thank you so much
    ...

  • @darleneabigail6443
    @darleneabigail6443 4 года назад

    Hi Alex , please make a video about how to add blade template engine to codeigniter 4

  • @JeewakaKarunaratne
    @JeewakaKarunaratne 4 года назад

    Dear Alex, thank you for educating about layout. i have two questions,
    1) you showed load one page using layout with 'content' tag, so each page 'content' tag to use to load layout?
    2) for navigation how to load layout and content page?

    • @AlexLancer
      @AlexLancer  4 года назад +2

      1. Yes
      2. Put your navigation in a separate view file "nav.php". Then inside of your layout file use
      Hope that helps!

  • @konam4341
    @konam4341 Год назад

    Hi, I get this error Use of $this in global code might be unatendedPHP(PHP0437). It appears if I use the extend and render method.
    Can you tell me what cause this error and how to fix this?

  • @filippolevizzani4584
    @filippolevizzani4584 3 года назад

    Hi, is it possible to pass a "parent" layout to a view programmatically?

  • @JeewakaKarunaratne
    @JeewakaKarunaratne 4 года назад

    Hi Alex, can you kindly answer my previous question? how to load meta description, title in layout view.

    • @IngPedroAraujo
      @IngPedroAraujo 4 года назад +1

      Hey! Buddy
      Take the idea from my answer that I wrote to Mussiddiq Rahman.
      I meant you have to create a render section for every dinamics parte in your Layouts.

  • @musaddiqktk
    @musaddiqktk 4 года назад

    Hi Alex, thank you explaining in such detail. I've one question, how we change title of main layout page. So that every page should have separate title.

    • @LlegoManuel
      @LlegoManuel 4 года назад

      Im not really sure, but looks like the data array has the variables for the view and the layout. Hope it helps.

    • @IngPedroAraujo
      @IngPedroAraujo 4 года назад +2

      Hey! Buddy
      I do it in this way:
      1.- I create a render section called 'metaPageTitle' for example:
       |  My Blog
      2.- To show a different title on your pages write:
      Your title
      I hope this can help you.

  • @bathroomSinger_11
    @bathroomSinger_11 4 года назад

    nice, Thanks

  • @ikbarrahma6590
    @ikbarrahma6590 3 года назад

    Call to undefined method CodeIgniter\View\View::extends()
    I can't extend to the template

  • @maulanahahaha
    @maulanahahaha 4 года назад

    wooow. thankyou so much...

  • @Mrscandeia
    @Mrscandeia 4 года назад +1

    show. kd o github codfonte ?

    • @AlexLancer
      @AlexLancer  4 года назад

      Hey, Manoel, at this point no I did not upload.

  • @jigglypotatoes
    @jigglypotatoes 4 года назад +1

    Very helpful thanks.