path_form
- Versions
- 4.6 – 5
path_form($edit = '')
Return a form for editing or creating an individual URL alias.
Code
modules/path.module, line 174
<?php
function path_form($edit = '') {
$form .= form_textfield(t('Existing system path'), 'src', $edit['src'], 50, 64, t('Specify the existing path you wish to alias. For example: node/28, forum/1, taxonomy/term/1+2.'));
$form .= form_textfield(t('New path alias'), 'dst', $edit['dst'], 50, 64, t('Specify an alternative path by which this data can be accessed. For example, type "about" when writing an about page. Use a relative path and don\'t add a trailing slash or the URL alias won\'t work.'));
if ($edit['pid']) {
$form .= form_hidden('pid', $edit['pid']);
$form .= form_submit(t('Update alias'));
}
else {
$form .= form_submit(t('Create new alias'));
}
return form($form);
}
?>Login or register to post comments 