-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* #345 Simplify breadcrumbs logic * #345 Rm model.Page.get_index method * #345 Implement breadcrumbs functions * #345 Rm redundant "select_related" field * #345 Minor logic fixes * #345 Review#1 fix. Create two public methods instead of one with configuration
- Loading branch information
Showing
6 changed files
with
63 additions
and
132 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,33 @@ | ||
{% load pages_extras %} | ||
|
||
<div class="breadcrumbs-wrapper" itemscope itemtype="https://schema.org/BreadcrumbList"> | ||
{% for name, url in crumbs_list %} | ||
{% if url %} | ||
<span class="breadcrumbs-item" itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem"> | ||
<a href="{{ base_url }}{{ url }}" itemprop="item" class="breadcrumbs-link"> | ||
<span itemprop="name">{{ name }}</span> | ||
</a> | ||
<meta itemprop="position" content="{{ forloop.counter }}"> | ||
{% if not forloop.last %} | ||
<span class="breadcrumbs-separator">{{ separator }}</span> | ||
{% endif %} | ||
</span> | ||
{% for logic_page in breadcrumbs %} | ||
<span class="breadcrumbs-item" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"> | ||
{% if not forloop.last %} | ||
<a href="{{ logic_page.model.url }}" itemscope itemtype="http://schema.org/Thing" itemprop="item" | ||
class="breadcrumbs-link"> | ||
<span itemprop="name">{{ logic_page.model.display_menu_title }}</span> | ||
</a> | ||
{% else %} | ||
<span>{{ name }}</span> | ||
<span itemprop="name">{{ logic_page.model.display_menu_title }}</span> | ||
{% endif %} | ||
|
||
{% if show_siblings and logic_page.siblings %} | ||
<ul class="breadcrumbs-siblings-links list-white"> | ||
{% for page in logic_page.siblings %} | ||
<li> | ||
<a href="{{ page.url }}" class="list-white-link"> | ||
{{ page.display_menu_title }} | ||
</a> | ||
</li> | ||
{% endfor %} | ||
</ul> | ||
{% endif %} | ||
|
||
<meta itemprop="position" content="{{ forloop.counter }}"> | ||
{% if not forloop.last %} | ||
<span class="breadcrumbs-separator">{{ separator }}</span> | ||
{% endif %} | ||
</span> | ||
{% endfor %} | ||
</div> |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6350027
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Puzzle
343-4255fdd0
disappeared frompages/logic/page.py
, that's why I closed #345. Please, remember that the puzzle was not necessarily removed in this particular commit. Maybe it happened earlier, but we discovered this fact only now.6350027
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Puzzle
345-5d25d7b3
discovered intests/catalog/test_views.py
and submitted as #347. Please, remember that the puzzle was not necessarily added in this particular commit. Maybe it was added earlier, but we discovered it only now.6350027
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Puzzle
345-e32a958e
discovered inpages/templatetags/pages_extras.py
and submitted as #348. Please, remember that the puzzle was not necessarily added in this particular commit. Maybe it was added earlier, but we discovered it only now.