Dynamic Properties & Element Attributes Clarification

367 views
Skip to first unread message

Matt Martin

unread,
Jun 28, 2017, 6:03:11 PM6/28/17
to Google Web Designer beta
Hi There,

I was wondering if anyone could provide a quick rundown of each "Element Attribute" in the Dynamic Properties section of GWD and possibly provide an example Element > Element Attribute > Data Schema Object for each.  Things like "Text Content" and "Source" are relatively understandable, but i'm looking more towards "Alternate Page" and "Show Element" to understand what is capable of being passed through a feed.

Secondly, is there a way to trigger an animation or the visibility of another page via a Dynamic feed?

Thanks,
Matt

Dale Fenton

unread,
Jun 29, 2017, 12:16:20 PM6/29/17
to Google Web Designer beta
Background color: Sets the background-color CSS property on the element
Border color: Sets the border-color CSS property on the element
Font color: Sets the color CSS property on the element
Font size: Sets the font-size CSS property on the element
Opacity: Sets the opacity CSS property on the element
Padding: Sets the padding CSS property on the element
(note that all the above set the value as an inline style statement and will override any other CSS rules that are setup)

Repeat for each item in collection: AFAIK this is mainly used with carousel components to populate data into each frame of a carousel, you can create a "Group" element and then map a collection of data objects to the group. (See this link: https://support.google.com/webdesigner/answer/6321678?hl=en). If this attribute value is used for other things I'm not aware of them personally.

Text content: sets the element's innerText property to the value of the data object element
HTML content: sets the element's innerHTML property to the value of the data object element
-note that setting to Text content will escape HTML elements to plain text, whereas HTML content will allow you to pass in HTML strings that get parsed into actual elements

so for the string "Hello, <br> There" 

using Text content you would see:
Hello, <br> There

using HTML content you would see:
Hello,
There

Show element: if false, this will set display: none on the element, if true it appears to do nothing. It doesn't look like to me that you could set display: none on an element by default and then use this to set display: initial or something that would actually force it to display.

I'll try to take more like later to experiment and see what I can find for properties only found on components, and other elements with special settings.
Reply all
Reply to author
Forward
0 new messages