Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
photoswipe-3453071
Manage
Activity
Members
Labels
Plan
Custom issue tracker
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Issue forks
photoswipe-3453071
Commits
77a3e11d
Commit
77a3e11d
authored
9 years ago
by
Paris Liakos
Browse files
Options
Downloads
Patches
Plain Diff
Some README additions;
parent
1ba213b0
No related branches found
Branches containing commit
Tags
7.x-2.0-beta1
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
README.txt
+22
-0
22 additions, 0 deletions
README.txt
with
22 additions
and
0 deletions
README.txt
+
22
−
0
View file @
77a3e11d
...
...
@@ -31,7 +31,29 @@ it in a site specific (e.g. sites/mysite/libraries) or default folder
USAGE
=====
1. Multiple images in nodes
After adding an image field to any content type (e.g. 'article'), you can select
'PhotoSwipe: Preset1 to Preset2' as a display mode in Structure >> Content types
>> MyContentType in the tab 'Manage display'. All possible
combinations of image styles are proposed.
2. Multiple images in Views
To use photoswipe in views you must add a custom CSS class called
'photoswipe-gallery'.
Fields >> Content: Image >> Style settings >> check Customize field and label
wrapper HTML >> Wrapper HTML element (leave default) >> check Create a CSS class
>> add as CSS class 'photoswipe-gallery'.
It is NOT recommended to add the CSS class to Advanced >> Other >> CSS class in
a View since there are known issues with the ajax pager.
3. Single image in node
To load a single image in node you must add data-size="widthxheight"
(the exact size of the image) and the class="photoswipe" to display it properly.
e.g.
<a href="/images/test_img.png" class="photoswipe" data-size="640x400">
<img src="/images/test_img.png" alt="Test Image" />
</a>
It might be needed to load photoswipe assets in case they are not already loaded
To do so just call
photoswipe_load_assets();
in a THEME_preprocess_html() implementation of your theme.
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment