Skip to content

Extend cpagefield image type - #4071

Open
veskoto wants to merge 1 commit into
e107inc:masterfrom
veskoto:master
Open

Extend cpagefield image type#4071
veskoto wants to merge 1 commit into
e107inc:masterfrom
veskoto:master

Conversation

@veskoto

@veskoto veskoto commented Jan 17, 2020

Copy link
Copy Markdown
Member
  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.

@qlty-cloud-legacy

Copy link
Copy Markdown

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

Jimmi08 commented Jan 18, 2020

Copy link
Copy Markdown
Member

@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

CaMer0n commented Jan 23, 2020

Copy link
Copy Markdown
Member

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.

3 participants