You can use the following code snippet to change the required attribute of the path field in the node form alter in this way:
This will keep the path tab open by default and mark the alias field as required.
You can use the following code snippet to change the required attribute of the path field in the node form alter in this way:
This will keep the path tab open by default and mark the alias field as required.
You can use the following code to set URL alias for a node if your website also uses Pathauto
Where $node_url is the desired alias and $node is loaded node object.