Forum

Thread tagged as: Field-Types

Document Type in Assets

Can I use the the Document type in Assets type to store an <iframe> --- content --- </iframe>?

My application is that we have about 50 chunks of code from Amazon (as <iframes>), each of which provides a link to the relevant Amazon page for purchase, The <iframe> contains a ink to an image and some text thus:

<iframe style="width:120px;height:240px;" marginwidth="0" marginheight="0" scrolling="no" frameborder="0" src="//ws-eu.amazon-adsystem.com/widgets/q?ServiceVersion=20070822&OneJS=1&Operation=GetAdHtml&MarketPlace=GB&source=ss&ref=ss_til&ad_type=product_link&tracking_id=xxxxx=GB&placement=1848684363&asins=1848684363&linkId=EEVOK4PNGWJDL2VM&show_border=true&link_opens_in_new_window=true"> </iframe>

We want our editors to be able to select one of more of these chunks to include in a Perch region on the page they are creating, offering readers the ability to click and buy.

Our idea is to use Assets for this, storing each as Document type. Will this work?

How do I define the region? Our current Asset region is defined thus:

<img src="<perch:content type="image" id="image" label="Image" width="200px" height="200px" quality="85"/>" alt="<perch:content type="text" id="alt" label="Description" required="true" help="Put Pilot or Squadron Badge here" title="true" />" />

What would I have to do to use a Document asset?

How could I ensure the Editor can insert several assets so they run horizontally in the same Perch region? In other words, can I insert several assets in a single region, or am I restricted to one asset/1 region (in which case I have to manually create several regions placed across the page.. correct?)

Thanks in advance

Stefan Youngs

Stefan Youngs 0 points

  • 6 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

Can I use the the Document type in Assets type to store an <iframe> --- content --- </iframe>?

No, it's for things like Word documents and PDFs that get linked to, not imported into the page.

Drew McLellan

Drew McLellan 2638 points
Perch Support

I would create a region for the iframes, and then use a dataselect to pick them.

OK thanks. I'll see if I can understand dataselect.