We’re currently experiencing a high volume of inquiries and our response time could be up to 2 days. We apologize for the delay, and thank you for your patience. Our available time: 2 AM - 1 PM (Monday - Friday) (UTC+0 Timezone).

Okay
  Public Ticket #2541052
Accessing view
Closed

Comments

  • AlexanderWM started the conversation

    My blade template file super.blade.php is located in platform/themes/%theme_name%/views/super.blade.php

    How to access it from platform/themes/%theme_name%/src/HTTP/Controllers/%Theme_name%Controller.php

     I'm trying

    public function getMySuperPagePlease(Request $request)
    {    return view('super');
    }


    But path to view is wrong. What is correct way?

  •  2,537
    Support replied

    Hi,

    Use:

    return Theme::scope('super')->render();

    With data:

    $abc = 'aaa';
    return Theme::scope('super', ['abc' => $abc])->render();


    Docs: https://docs.botble.com/cms/5.8/theme