Jump to content

Cover photo template


Go to solution Solved by Nathan Explosion,

Recommended Posts

Posted (edited)
7 minutes ago, Nathan Explosion said:

core -> front -> forms -> popupTemplate

Right after the opening "<form..." line, add:

{{if $id = "coverPhoto"}}
    YOUR STUFF
{{endif}}

 

It's affecting profile photo.

Don't have a way to separate?

Screenshot_249.png.4ed96c91ca011989961e410ee2207c0d.png

Edited by Hisashi
Posted (edited)
16 hours ago, Hisashi said:

It's affecting profile photo

Show your code.

<form accept-charset='utf-8' class="ipsForm {$class}" action="{$action}" method="post" {{if $uploadField}}enctype="multipart/form-data"{{endif}} {{foreach $attributes as $k => $v}}{$k}="{$v}"{{endforeach}} data-ipsForm>
  {{if $id == "coverPhoto"}}
    YOUR STUFF
{{endif}}

Works fine for me - why? The 'Edit cover photo' link produces a form with the $id of 'coverPhoto' while the link beside the profile photo produces a form with the $id of 'profile_photo'

Edited by Nathan Explosion
Posted (edited)
2 hours ago, Nathan Explosion said:

Show your code.

<form accept-charset='utf-8' class="ipsForm {$class}" action="{$action}" method="post" {{if $uploadField}}enctype="multipart/form-data"{{endif}} {{foreach $attributes as $k => $v}}{$k}="{$v}"{{endforeach}} data-ipsForm>
  {{if $id = "coverPhoto"}}
    YOUR STUFF
{{endif}}

Works fine for me - why? The 'Edit cover photo' link produces a form with the $id of 'coverPhoto' while the link beside the profile photo produces a form with the $id of 'profile_photo'

I put it as informed, and it's appearing in both

<form accept-charset='utf-8' class="ipsForm {$class}" action="{$action}" method="post" {{if $uploadField}}enctype="multipart/form-data"{{endif}} {{foreach $attributes as $k => $v}}{$k}="{$v}"{{endforeach}} data-ipsForm>
	{{if $id = "coverPhoto"}}
	YOUR STUFF
	{{endif}}
	<input type="hidden" name="{$id}_submitted" value="1">
	{{foreach $hiddenValues as $k => $v}}

Screenshot_253.png.1bbfe041bb1da8094087b59c9b13fc1b.png

Edited by Hisashi
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...