Commit 81f6a897 authored by Philippe Joulot's avatar Philippe Joulot Committed by Joseph Olstad
Browse files

Issue #3213045: Display more is defined in config but the feature is just missing

parent f289ef0b
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -84,6 +84,13 @@ class TagcloudsAdminPage extends ConfigFormBase {
     '#description' => $this->t('When there is only one content tagged with a certain term, link that term to this node instead of the term list page.'),
    ];

    $form['display_more_link'] = [
     '#type' => 'checkbox',
     '#title' => $this->t('Display show more link'),
     '#default_value' => $config->get('display_more_link'),
     '#description' => $this->t('Display a show more link when all the tags have not been displayed.'),
    ];

    $page_amount = $config->get('page_amount');
    $form['page_amount'] = [
      '#type' => 'textfield',
@@ -127,6 +134,7 @@ class TagcloudsAdminPage extends ConfigFormBase {
      ->set('sort_order', $form_state->getValue('sort_order'))
      ->set('display_type', $form_state->getValue('display_type'))
      ->set('display_node_link', $form_state->getValue('display_node_link'))
      ->set('display_more_link', $form_state->getValue('display_more_link'))
      ->set('page_amount', $form_state->getValue('page_amount'))
      ->set('levels', $form_state->getValue('levels'));

+1 −1
Original line number Diff line number Diff line
@@ -145,7 +145,7 @@ class TagcloudsTermsBlock extends BlockBase implements ContainerFactoryPluginInt
      $content[] = [
        'tags' => $this->cloudBuilder->build($tags),
      ];
      if (count($tags) >= $tags_limit && $tags_limit > 0) {
      if (count($tags) >= $tags_limit && $tags_limit > 0 && $this->configFactory->getEditable('tagclouds.settings')->get('display_more_link')) {
        $content[] = [
          '#type' => 'more_link',
          '#title' => $this->t('more tags'),