Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extend cpagefield image type #4071

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

veskoto
Copy link
Member

@veskoto veskoto commented Jan 17, 2020

  1. Check if $value is null or empty
  2. {CPAGEFIELD: name=XXXX&type=full} return full path to image. This ignore thumb params.
  3. {CPAGEFIELD: name=XXXX&type=popup} return a wrapped image with link to full image path.

@codeclimate
Copy link

codeclimate bot commented Jan 17, 2020

Code Climate has analyzed commit c11b345 and detected 2 issues on this pull request.

Here's the issue category breakdown:

Category Count
Complexity 2

The test coverage on the diff in this pull request is 60.0% (80% is the threshold).

This pull request will bring the total coverage in the repository to 5.4% (0.0% change).

View more on Code Climate.

@veskoto veskoto requested a review from CaMer0n January 17, 2020 10:12
@Jimmi08
Copy link
Contributor

Jimmi08 commented Jan 18, 2020

@veskoto
Are you aware that with replaceConstants() you are exploring your hashed sitekey?
And that correct way for this is $tp->thumbUrl($value,$parm) (with parameters w=0&h=0, not sure about correct syntax now to get full image, not resized)

And your popup should be solved in the template by calling image field 2x - one with raw parameter and one without it. The rest is HTML markup that can be different for another theme.

@CaMer0n
Copy link
Member

CaMer0n commented Jan 23, 2020

Thank you @veskoto . I'll look into this.. the PR is not exactly how I think it should happen, but inside thumbUrl().

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants