Skip to content

Commit

Permalink
fix feed url
Browse files Browse the repository at this point in the history
  • Loading branch information
Jovanka committed Aug 14, 2024
1 parent d53ed31 commit 62027a5
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 5 deletions.
18 changes: 17 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ The `root_breadcrumb`-URL-parameter takes precedence over the `datasetsnippets.d

## Configuration

The plugin introduces two configuration options:
The plugin introduces the following configuration options:

### datasetsnippets.path

Expand Down Expand Up @@ -68,6 +68,22 @@ Defines the string that is used as the root element for the breadcrumb that is p
datasetsnippets.default_root_breadcrumb = 'Berlin Open Data'
```

### datasetsnippets.datenportal_url

Defines the url to the datenportal. The url will then be used for generating the feeds using the provided url.

```ini
datasetsnippets.datenportal_url = link_to_portal
```

### datasetsnippets.datenportal_title

Defines a string that will be used as a title in the feeds.

```ini
datasetsnippets.datenportal_title = 'Berlin Open Data'
```

## License

This material is copyright © [BerlinOnline Stadtportal GmbH & Co. KG](https://www.berlinonline.net/).
Expand Down
2 changes: 1 addition & 1 deletion ckanext/datasetsnippets/blueprints/snippet_blueprint.py
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ def remove_field(key, value=None, replace=None):
# that search function is taking, in order to produce the results for the feeds
from ckanext.datasetsnippets.blueprints import feeds
fq_feed = fq.replace('+dataset_type:dataset', '')
feed = 'drupal_feeds/custom.atom?q=' + q + '&fq=' + fq_feed
feed = 'drupal_feeds/custom.atom?q=' + q + '&' + fq_feed
c.feed = feed

c.page = h.Page(
Expand Down
5 changes: 2 additions & 3 deletions ckanext/datasetsnippets/templates/datasetsnippets/search.html
Original file line number Diff line number Diff line change
Expand Up @@ -83,13 +83,12 @@ <h1 class="title">Suche nach Datensätzen</h1>
{% endif %}
{% endblock %}
<div class="feed-icons">
<a href={{c.feed}} class="feed-icon"></a>
<a href="{{c.feed}}" class="feed-icon"></a>
</div>
</div>
</div>
</div>
</div>
</div>

{% endblock %}

{% endblock %}

0 comments on commit 62027a5

Please sign in to comment.