How To add new Pages in MP3 Converter Pro

In order to add a new, static Page like, e.g., "domain.com/about" that displays a new About page, please do the following:

  • Open "routes/web.php", find the relevant code below, and then add a new Route (as per the code in red text):
Route::group(['prefix' => LaravelLocalization::setLocale(), 'middleware' => ['localeSessionRedirect', 'localizationRedirect', 'localeViewPath']], function ()
{
    /** ADD ALL LOCALIZED ROUTES INSIDE THIS GROUP **/
    Route::get('/', function ()
    {
        // Block Website iframes
        header("X-Frame-Options: DENY");
        return view('homepage.index', ['meta' =>
            ['title' => trans('meta.title'), 'description' => trans('meta.description')]
        ]);
    })->name('index');

    Route::get('/developers', function ()
    {
        // Block Website iframes
        header("X-Frame-Options: DENY");
        return view('docs.api',['meta' =>
            ['title' => 'Developer - ' . trans('meta.title'), 'description' => 'Developer API - ' . trans('meta.description')]
        ]);
    })->name('developer');

    Route::get('/about', function ()
    {
        // Block Website iframes
        header("X-Frame-Options: DENY");
        return view('homepage.about', ['meta' =>
            ['title' => 'About us - ' . trans('meta.title'), 'description' => 'About us']
        ]);
    })->name('about');
});
  • Open "resources/views/components/navbar.blade.php", find the relevant code below, and then add a new Page to the Navbar (as per the code in red text):
<div class="navbar-center hidden md:flex">
    <ul class="menu menu-horizontal p-0">
        <li><a href="{{ route('index') }}">Home</a></li>
        <li><a href="{{ route('about') }}">About</a></li>
        @if (app(ApiDocSettings::class)->single || app(ApiDocSettings::class)->button || app(ApiDocSettings::class)->widget || app(ApiDocSettings::class)->json)
            <li><a href="{{ route('developer') }}">Developers</a></li>
        @endif
    </ul>
</div>

In the same file, also add a new Page to the Mobile Navbar (as per the code in red text):

<ul tabindex="0" class="text-neutral menu menu-compact dropdown-content mt-3 p-2 shadow bg-base-100 rounded-box w-52">
    <li><a href="{{ route('index') }}">Home</a></li>
    <li><a href="{{ route('about') }}">About</a></li>
    @if (app(ApiDocSettings::class)->single || app(ApiDocSettings::class)->button || app(ApiDocSettings::class)->widget || app(ApiDocSettings::class)->json)
        <li><a href="{{ route('developer') }}">Developers</a></li>
    @endif
</ul>
  • Navigate to "resources/views/homepage", create a new file (e.g., "about.blade.php"), and then add the following content to the new Page:
<x-app-layout :meta="$meta">
    <x-navbar class="text-neutral bg-base-100 shadow-sm backdrop-blur bg-opacity-90 border-base-200"></x-navbar>
    <div class="hero min-h-screen bg-base-200">
        <div class="hero-content text-center">
            <div class="max-w-md">
                <h1 class="text-5xl font-bold">About us</h1>
                <p class="py-6">
                    YOUR CONTENT HERE
                </p>
            </div>
        </div>
    </div>
    <x-footer></x-footer>
</x-app-layout>
  • 3 Users Found This Useful
Was this answer helpful?

Related Articles

How to reset Admin Panel password in MP3 Converter Pro or YouTube Video Backend

1) Create a free Account on MailTrap.io 2) Click in the Sidebar on Sandbox > Inboxes 3)...

I get a 500 error, what should I do?

To find out the exact problem, enable the debug mode of the product. Open the corresponding .env...