Hi,
I am building a community website programmatically, therefore most of the configuration is done through modules (setting variables, creating default content, etc.)
Would it be possible in pathauto.install, function pathauto_install() to setup the default variables (patterns, etc.) only if they do not exists yet. Currently pathauto simply dump its default value without caring for existing ones. It is not a big change, and it would certainly make life easier for a couple of people like me who are using drupal as a framework.
The simple way to achieve that is to replace instructions like this one:
variable_set('pathauto_node_pattern', 'content/[node:title]');
by
$v = variable_get('pathauto_node_pattern', 'content/[node:title]');
variable_set('pathauto_node_pattern', $v);
I should be able tp provide a patch if required.
Cheers,
Sylvain
Comments
Comment #1
dave reidI think this should probably work.
Comment #3
dave reidWithout a spelling error this time.
Comment #4
spouilly commentedPatch #3 get the job done for me.
Comment #5
dave reidComment #8
dave reidCommitted #3 to 7.x-1.x.