Correct way of adding a page in a custom module? eg. About Us

Hell Friends,

I have a custom module where I am creating menu items and displaying custom pages for these items.

An example of how I render my contact page is as follows:

business_listing.routing.yml:

business_listing.about:
 path: '/about'
 defaults:
   _title: 'About Us'
   _controller: '\Drupal\business_listing\Controller\AboutController:loadAbout'
 requirements:
   _permission: 'access simple page' 

AboutController.php:

Tip for simple theme

Hi,

For my site project I will only need a minimal design.

A very simple theme, without grid, with just as elements: a dropdown menu and collapse.

I would therefore like to avoid using a theme such as bootstrap which for my need is unit.

So I created a simple theme, with classy as parent. But, I need the dropdown menu and collapse.

What is the best alternative? The lightest?

I saw that there was superfish module, but it requires the module librarires API etc. Finally several modules for a simple need.

Using lighting distribution, how to upgrade Devel module to 8.x-2.0

Hi,

I'm using lighting distribution, when I try to upgrade Devel module from 8.x-1.0 to 8.x-2.0, composer show me failed message:

Your requirements could not be resolved to an installable set of packages.

Updating Drupal core with Drush

I have Drush 9.4.0 on one of my sites and when I wanted to install Drush on another site, a friend asked me to install Drush 8 instead saying its more stable than Drush 9 and it works for Drupal 8 also, so I installed Drush 8.1.17 on the second site; both sites are Drupal 8 sites. 

I want to know the steps to update Drupal core using both versions of Drush (as in the step by step commands); update process including backing up site files and db, and then updating Drupal core. I installed both sites manually in the beginning before later installing Drush and Composer on the server.

Upgrade to 8.6.9 error in Theme_handler

After upgrade drupal core from 8.6.7 to 8.6.9 with composer i have got an error "ThemeHandler.php line 491:The theme my_theme does not exist". I tried to clear the cache, but the site is no longer available. I turned back to 8.6.7. So i neeed al little help. Tank you fred

Multiple Views on page loading very slow | D8

So, I am moving to Drupal 8 from Drupal 7....

My Homepage has 7 Views blocks (1 image + teaser + title each) - and it seems in Drupal 8 they are loading Significantly slower / worse as in Drupal 7 the same Homepage....

It seems like in Drupal 8 (when I am logged in) - the Front page is loading, then it stopps and loading each view separately for few seconds and with freezing....

Am I missing something?!

However, when I am logged out - it is loading very good, no problem, but I think it's because it is on Cloudflare caching;

Pages

Subscribe with RSS Subscribe to RSS - Drupal 8.x