✨ Add source link
This commit is contained in:
parent
bc01c234d1
commit
47d95c7e4d
4 changed files with 43 additions and 0 deletions
|
@ -92,6 +92,15 @@ echo Bootstrap::pageTitle(array('title'=>$L->g("Edit")." (".$contentType->plural
|
||||||
'rows' => 5,
|
'rows' => 5,
|
||||||
'placeholder' => $L->get('this-field-can-help-describe-the-content')
|
'placeholder' => $L->get('this-field-can-help-describe-the-content')
|
||||||
));
|
));
|
||||||
|
|
||||||
|
// Source Link
|
||||||
|
echo ContentPage::formInputTextBlock($contentType,array(
|
||||||
|
'name' => 'sourceLink',
|
||||||
|
'label' => $L->g('Source Link'),
|
||||||
|
'placeholder' => '',
|
||||||
|
'tip' => $L->g('The external link you refer to in the post'),
|
||||||
|
'value' => $page->sourceLink()
|
||||||
|
));
|
||||||
} ?>
|
} ?>
|
||||||
|
|
||||||
<!-- Custom fields: BOTTOM -->
|
<!-- Custom fields: BOTTOM -->
|
||||||
|
@ -176,6 +185,15 @@ echo Bootstrap::pageTitle(array('title'=>$L->g("Edit")." (".$contentType->plural
|
||||||
'rows' => 5,
|
'rows' => 5,
|
||||||
'placeholder' => $L->get('this-field-can-help-describe-the-content')
|
'placeholder' => $L->get('this-field-can-help-describe-the-content')
|
||||||
));
|
));
|
||||||
|
|
||||||
|
// Source Link
|
||||||
|
echo ContentPage::formInputTextBlock($contentType,array(
|
||||||
|
'name' => 'sourceLink',
|
||||||
|
'label' => $L->g('Source Link'),
|
||||||
|
'placeholder' => '',
|
||||||
|
'tip' => $L->g('The external link you refer to in the post'),
|
||||||
|
'value' => $page->sourceLink()
|
||||||
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Sticky
|
// Sticky
|
||||||
|
|
|
@ -85,7 +85,17 @@ echo Bootstrap::pageTitle(array('title'=>$L->g("New")." (".$contentType->plural(
|
||||||
'rows' => 5,
|
'rows' => 5,
|
||||||
'placeholder' => $L->get('this-field-can-help-describe-the-content')
|
'placeholder' => $L->get('this-field-can-help-describe-the-content')
|
||||||
));
|
));
|
||||||
|
|
||||||
|
// Source Link
|
||||||
|
echo ContentPage::formInputTextBlock($contentType,array(
|
||||||
|
'name' => 'sourceLink',
|
||||||
|
'label' => $L->g('Source Link'),
|
||||||
|
'placeholder' => '',
|
||||||
|
'tip' => $L->g('The external link you refer to in the post'),
|
||||||
|
'value' => ''
|
||||||
|
));
|
||||||
} ?>
|
} ?>
|
||||||
|
|
||||||
<!-- Custom fields: BOTTOM -->
|
<!-- Custom fields: BOTTOM -->
|
||||||
<?php
|
<?php
|
||||||
$customFields = $site->customFields();
|
$customFields = $site->customFields();
|
||||||
|
@ -167,6 +177,15 @@ echo Bootstrap::pageTitle(array('title'=>$L->g("New")." (".$contentType->plural(
|
||||||
'rows' => 5,
|
'rows' => 5,
|
||||||
'placeholder' => $L->get('this-field-can-help-describe-the-content')
|
'placeholder' => $L->get('this-field-can-help-describe-the-content')
|
||||||
));
|
));
|
||||||
|
|
||||||
|
// Source Link
|
||||||
|
echo ContentPage::formInputTextBlock($contentType,array(
|
||||||
|
'name' => 'sourceLink',
|
||||||
|
'label' => $L->g('Source Link'),
|
||||||
|
'placeholder' => '',
|
||||||
|
'tip' => $L->g('The external link you refer to in the post'),
|
||||||
|
'value' => ''
|
||||||
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Sticky
|
// Sticky
|
||||||
|
|
|
@ -24,6 +24,7 @@ class Pages extends dbJSON
|
||||||
'noindex' => false,
|
'noindex' => false,
|
||||||
'nofollow' => false,
|
'nofollow' => false,
|
||||||
'noarchive' => false,
|
'noarchive' => false,
|
||||||
|
'sourceLink'=>'',
|
||||||
'custom' => array()
|
'custom' => array()
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
|
@ -447,6 +447,11 @@ class Page
|
||||||
return $this->getValue('noarchive');
|
return $this->getValue('noarchive');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// retour the source link
|
||||||
|
public function sourceLink() {
|
||||||
|
return $this->getValue('sourceLink');
|
||||||
|
}
|
||||||
|
|
||||||
// Returns the page slug
|
// Returns the page slug
|
||||||
public function slug()
|
public function slug()
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Reference in a new issue