You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If the bidder e.g. doesn't send a value for body which would replace the ##hb_native_body## placeholder, the string ##hb_native_body## will be inserted in the HTML template.
I suppose that when the native template calls renderNativeAd(pbNativeTagData) (with pbNativeTagData.requestAllAssets set to true), the function below is responsible to answer that request?
That would mean that a key-value pair for body only gets pushed in the message.assets array if body is part of adObject.native. If it's not, the placeholder won't be replaced.
Question
So what exactly is the purpose of setting requestAllAssets to true? 😊 I'm sure there were a lot of thoughts behind this!
Wished behavior
We were hoping being able to use the :empty selector in our native design's CSS in order to set a HTML element to display: none in case the bidder didn't send a value that can be inserted instead of the placeholder. That - however - only works if the placeholder was replaced by an empty string.
Thank you for your help!!
The text was updated successfully, but these errors were encountered:
Type of issue
Question
Description
While testing the new native creative implementation (https://docs.prebid.org/prebid/native-implementation.html), we realized that a prebid native ##macro## only gets replaced if a corresponding asset is sent.
If the bidder e.g. doesn't send a value for
body
which would replace the##hb_native_body##
placeholder, the string##hb_native_body##
will be inserted in the HTML template.I suppose that when the native template calls
renderNativeAd(pbNativeTagData)
(withpbNativeTagData.requestAllAssets
set totrue
), the function below is responsible to answer that request?Prebid.js/src/native.js
Lines 228 to 255 in f0596c4
That would mean that a key-value pair for
body
only gets pushed in themessage.assets
array ifbody
is part ofadObject.native
. If it's not, the placeholder won't be replaced.Question
So what exactly is the purpose of setting
requestAllAssets
to true? 😊 I'm sure there were a lot of thoughts behind this!Wished behavior
We were hoping being able to use the
:empty
selector in our native design's CSS in order to set a HTML element todisplay: none
in case the bidder didn't send a value that can be inserted instead of the placeholder. That - however - only works if the placeholder was replaced by an empty string.Thank you for your help!!
The text was updated successfully, but these errors were encountered: