How to load page content /node/add/page programmatically in custom region? Example of custom region (https://jsfiddle.net/makbuk/1vetkgL2/).

I have found this How to get a node by its url alias? but it dosn't work for me.

$alias = "some/path/to/a/page";
$path = drupal_lookup_path("source", $alias);
$node = menu_get_object("node", 1, $path);
  • 1
    Are you trying to load the node form, or the node content? Also I assume this is for Drupal 7, but saying which version you're using is helpful. – acrosman Jul 19 '16 at 21:20

You can accomplish this with the Form Block module

Enables the presentation of user registration, site wide contact, or node creation forms in blocks. This is particularly useful for including forms on panels.

Then in blocks (/admin/structure/block), assign the Form Block to your desired region.

| improve this answer | |
  • 1
    It works for me, it came without programming, thanks. – makbuk Jul 20 '16 at 9:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.