drupal|May 31, 2020|1 min read

Drupal 8 - How to create a Page with admin access and create its menu entry in Reports (No Coding)

TL;DR

Use the Views module to create a page with admin role restriction and configure its menu link under the Reports section for easy access.

Drupal 8 - How to create a Page with admin access and create its menu entry in Reports (No Coding)

Introduction

I needed a report page, where I wanted to have some information that only admin can view. And, I was in no mood of custom coding. So, the objectives are:

  • Create a new Page with admin role restriction
  • Its menu entry should be created under Reports section so that I dont need to remember its URL

Create a new Admin Page

I used views module for this. Lets have a look at the steps:

  • Goto /admin/structure/views/add
  • Give a name and description
  • Click on Create a page.
  • Give a title, and path. Note: The path can start from anywhere. I gave its path as /admin/stories
  • Under Page Settings in middle of view edit screen
    • Click on Access setting, select Role in Access restrictions, Apply. Select Role as Administrator
    • Click on Menu, and select Reports as shown in below image

Drupal admin page menu option Drupal admin page menu option

Final Setting Drupal admin page menu option

  • Goto /admin/reports/

You will see your menu created here. Now, you can put more blocks in this page. Everything here will be accessible to Administration role only.

Related Posts

Drupal 8 - How to Theme Form and its Fields with reordering fields

Drupal 8 - How to Theme Form and its Fields with reordering fields

Introduction In this post, we will see how to theme form and its fields…

Drupal: How to detect country and redirect to country specific website by using Cloudflare

Drupal: How to detect country and redirect to country specific website by using Cloudflare

Introduction Assume you have a drupal website and using cloudflare. You are…

Drupal - How to rename column of a content type

Drupal - How to rename column of a content type

Introduction You already have a content type with one or more fields in it…

Drupal 8 - How to hide help link About text formats and text format guidelines

Drupal 8 - How to hide help link About text formats and text format guidelines

Problem In drupal textarea field, it was always a pain to see the two links…

Drupal 8 Smart Image Style - Handle aspect ratio for small and long images

Drupal 8 Smart Image Style - Handle aspect ratio for small and long images

Problem Statement I’ve been using image styles, and heavily used “Scale and crop…

Drupal 8 Comment module - How to configure comments module from ugly to beautiful - Theming comments module

Drupal 8 Comment module - How to configure comments module from ugly to beautiful - Theming comments module

Introduction Drupal provides a powerful comment module, which comes as a part of…

Latest Posts

Claude Code Skills — Build a Better Engineering Workflow with AI-Powered Code Reviews, Security Scans, and More

Claude Code Skills — Build a Better Engineering Workflow with AI-Powered Code Reviews, Security Scans, and More

Most developers use Claude Code like a search engine — ask a question, get an…

Building an AI Voicebot for Visitor Check-In — A Practical Guide to Handling the Messy Parts

Building an AI Voicebot for Visitor Check-In — A Practical Guide to Handling the Messy Parts

Every office lobby has the same problem: a visitor walks in, nobody’s at the…

Server Security Best Practices — Complete Hardening Guide for Production Systems

Server Security Best Practices — Complete Hardening Guide for Production Systems

Every breach post-mortem tells the same story: an unpatched service, a…

Staff Engineer Study Plan for MAANG Interviews — The Complete 12-Week Roadmap

Staff Engineer Study Plan for MAANG Interviews — The Complete 12-Week Roadmap

If you’re a Senior Engineer (L5) preparing for Staff (L6+) roles at MAANG…

XSS and CSRF Explained — The Complete Guide with Real Attack Examples and Defenses

XSS and CSRF Explained — The Complete Guide with Real Attack Examples and Defenses

XSS and CSRF have been in the OWASP Top 10 for over a decade. They’re among the…

OWASP Top 10 (2021) — Every Vulnerability Explained with Code

OWASP Top 10 (2021) — Every Vulnerability Explained with Code

The OWASP Top 10 is the industry standard for web application security risks. If…