Adding JS with library without jquery or jquery-once dependency

If you want to add some JS code, like some kind of snippet to your pages with libraries.yml, add it as any other library item but don't use jquery or drupal behaviours in .js code, add some plain JS code like

document.addEventListener("DOMContentLoaded", function() {

so to wrap some JS snippet for it, do it like below.

Block build output, theme and allowed_tags tags

To output block, you can attach which theme template will output it, which library to attach to it, what markup will be outputed and in the end what tags can be in this markup
 

Removing a link from Webform block

If you display your webform as block and then also use Full Node view in block settings, you will have a title that leads to the webform itself. Probably you don't want to do that. But what to override, it's kind of simple, just override node--node_id.tpl.php as this is in the end a node display and remove link from h2 tag. That is all.

PHP block visibilty

To set block visibilty with fine details in drupal 7, you need to install php filter which is part of drupal core but not enabled by default. And then off to write some code. First part of code uses node type to show, in this case hide block for particular content type and in the second, we check url argument, so we hide if for particaler views.

Drupal 6 to drupal 7 migration tips

However you choose to do a migration from drupal 6 to drupal 7 if you have any complexity in your site it is going to be ugly. Lots of errors and leaps of faith :-).

I choose to do it with drush. So after the drush made what it could do. I tested the site. Not working at all, not even logging in possible. What I did is:

Adding menu level value to CSS class

I need to theme a menu so that each level has different class in CSS. This needs to be done over template.php and additional code that adds menu level value to your links.

Here is the code you paste in template.php for drupal 7

How many modules

Often you can see if drupal site is bloated with modules if you just check how many of them are enabled, you can do this quickly with mysql command.

select name from system 
where type = 'module' and status = 1 
order by name;

Webform block redirect page

You hate it when webform block redirects to webform page and your visitor loses the page he/she was on when submiting form. Well you can sort this out.