Create Menu


Menus are a collection of links (menu items) used to navigate a website. For more details, see CMS Menus's documentation

For creating menu, you need to follow some steps:

1. Create Location through seeds.

Create a json file of name theme_locations.json at VaahCms/Themes/BlogTheme/Database/Seeds/json/ this directory.

copy

├── BlogTheme ├── Database/ ├── Seeds/ ├── DatabaseTableSeeder.php ├── SampleDataTableSeeder.php ├── json/ ├── theme_locations.json

To run this seed, you have to add some code in DatabaseTableSeeder.php file.

copy

Now, you just need to reactivate the theme by visiting this url:

<project-url>/backend#/vaah/themes/

Once, the theme is activated, Location will also be created.

2. Create a Menu.

To create Menu, visit this url:

<project-url>/backend/cms#/menus/

  • Select Theme
  • Select Location
  • Create Menu Or Select existing Menu
{!! vh_location('top', true) !!}

Now, you can copy this code and paste it in home blade file. Remove hard code of menu.

copy

Now, You can see the Cms Menu.