Run prettier on all *.md files

```
prettier '{app,source}/**/**.md' --write
```
This commit is contained in:
Oliver Davies 2020-03-08 17:52:59 +00:00
parent a3ceeaf0f3
commit 85a10c545b
170 changed files with 5127 additions and 2282 deletions

View file

@ -5,23 +5,38 @@ excerpt: Grouping galleries by category.
tags:
- drupal
---
The next part of the new gallery that I want to implement is to group the galleries by their respective categories. The first step is to edit my original photo_gallery view and add an additional display.
I've called it 'Taxonomy', and it's similar to the original 'All Galleries' view. The differences are that I've added the taxonomy term as an argument, removed the header, and updated the path to be `gallery/%`. The other thing that I need to do is overwrite the output of the original 'All Galleries' View by creating a file called `views-view--photo-gallery--page-1.tpl.php` and placing it within my theme directory.
The next part of the new gallery that I want to implement is to group the
galleries by their respective categories. The first step is to edit my original
photo_gallery view and add an additional display.
Within that file, I can remove the standard content output. This still outputs the heading information from the original View. I can now use the function called 'views_embed_view' to embed my taxonomy display onto the display. The views_embed_view function is as follows:
I've called it 'Taxonomy', and it's similar to the original 'All Galleries'
view. The differences are that I've added the taxonomy term as an argument,
removed the header, and updated the path to be `gallery/%`. The other thing that
I need to do is overwrite the output of the original 'All Galleries' View by
creating a file called `views-view--photo-gallery--page-1.tpl.php` and placing
it within my theme directory.
Within that file, I can remove the standard content output. This still outputs
the heading information from the original View. I can now use the function
called 'views_embed_view' to embed my taxonomy display onto the display. The
views_embed_view function is as follows:
```language-php
<?php views_embed_view('my_view', 'block_1', $arg1, $arg2); ?>
```
So, to display the galleries that are assigned the taxonomy of 'tournaments', I can use the following:
So, to display the galleries that are assigned the taxonomy of 'tournaments', I
can use the following:
```language-php
<?php print views_embed_view('photo_gallery', 'page_2', 'tournaments'); ?>
```
To reduce the amount of code needed, I can use the following 'while' loop to generate the same code for each taxonomy term. It dynamically retrieves the relevant taxonomy terms from the database, and uses each name as the argument for the view.
To reduce the amount of code needed, I can use the following 'while' loop to
generate the same code for each taxonomy term. It dynamically retrieves the
relevant taxonomy terms from the database, and uses each name as the argument
for the view.
```language-php
<?php