@@ -35,7 +34,7 @@ class SimplesitemapCustomLinksForm extends SimplesitemapFormBase {
'#title'=>$this->t('Custom links'),
'#type'=>'fieldset',
'#markup'=>'<p>'.$this->t('Add custom internal drupal paths to the XML sitemap.').'</p>',
'#prefix'=>$this->getDonationLink(),
'#prefix'=>$this->getDonationText(),
];
$form['simple_sitemap_custom']['custom_links']=[
...
...
@@ -45,7 +44,7 @@ class SimplesitemapCustomLinksForm extends SimplesitemapFormBase {
'#description'=>$this->t("Please specify drupal internal (relative) paths, one per line. Do not forget to prepend the paths with a '/'. You can optionally add a priority (0.0 - 1.0) by appending it to the path after a space. The home page with the highest priority would be <em>/ 1.0</em>, the contact page with the default priority would be <em>/contact 0.5</em>."),
||strpos($link_config['path'],'//')!==FALSE){// Path validator does not see a double slash as an error. Catching this to prevent breaking path generation.
$form_state->setErrorByName('',$this->t("<strong>Line @line</strong>: The path <em>@path</em> does not exist.",$placeholders));
}
...
...
@@ -80,15 +79,15 @@ class SimplesitemapCustomLinksForm extends SimplesitemapFormBase {
$form['simple_sitemap_entities']['entities'][$entity_type_id][$entity_type_id.'_enabled']['#description']=$this->t('Sitemap settings for this entity type can be set below and overridden on its entity pages.');
@@ -16,7 +38,7 @@ abstract class SimplesitemapFormBase extends ConfigFormBase {
return['simple_sitemap.settings'];
}
protectedfunctiongetDonationLink(){
protectedfunctiongetDonationText(){
return"<div class='description'>".$this->t("If you would like to say thanks and support the development of this module, a <a target='_blank' href='@url'>donation</a> is always appreciated.",['@url'=>'https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=5AFYRSBLGSC3W'])."</div>";
'#description'=>$this->t('If checked, only links to the translated content will be included, otherwise the sitemap will include links to all content translation variants, even when the content has not been translated yet.'),