Almost.
Yes on the channel entry holding just the video ID.
But Embed code would not go in a CSS document. It would go in your EE template that generates the page.
This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.
The active forums are here.
November 15, 2012 10:18am
Subscribe [3]#16 / Nov 20, 2012 4:55pm
Almost.
Yes on the channel entry holding just the video ID.
But Embed code would not go in a CSS document. It would go in your EE template that generates the page.
#17 / Nov 20, 2012 5:53pm
Ok I removed all of the previous content I had in my CSS doc. I entered just the # to a new video and it doesn’t show up. Here is what my main doc looks like. THe new entry I just made in the after effects channel doesn’t show up.
{exp:channel:entries limit="10"}
<div class=“main_feature”>
{if count ==1}
<div class=“video_large”>
<iframe src=“width=“700” height=“450” frameborder=“0” webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>
{/if}
{if count !=1}
<div class=“video_small”>
<iframe src=“width=“20” height=“15” frameborder=“0” webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>
{/if}
{after_effects_tutorial_link}
{after_effects_tutorial_summary}
{c4d_tutorial_link}
{c4d_tutorial_summary}
{apple_tutorial_link}
{apple_tutorial_summary}
{creative_suite_tutorial_link}
{creative_suite_tutorial_summary}
{inspiration_link}
{inspiration_summary}
{review_link}
{review_summary}
</div>
{/exp:channel:entries}
#18 / Nov 21, 2012 9:24am
Well,first off get a channel specified in your channel:entries loop. Without telling EE what channel to pull from it will pull from all channels.
Secondly I’m not seeing a src= parameter in your vimeo embeds.
You should have something like:
<iframe src="http://player.vimeo.com/video/{video_id_from_your_channel}" width="500" height="281" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>#19 / Nov 21, 2012 11:39pm
I had a src=parameter in the vimeo link. I didn’t specify a channel in my loop because I want the main page to pull from all of the videos, then each page will have its own channel. Like all of the after effects videos will go on the after effects page, same for cinema 4D. But the main page should pull all these videos in.
#20 / Nov 22, 2012 9:41am
I would still specify channels - just pipe together all the ones you want it to pull. This way when you add a “news” channel etc down the road it doesn’t pull content here unexpectedly. It’s overall just a good habit to get into, and when you come back to this code in 2 years it’ll be much more obvious and readable with things explicitly set.
I’d recommend a couple things:
- Start with a static template that has two of the iframe code chunks from Vimeo - get them sized and arranged how you want.
- Work incrementally, replacing the static code with EE code. start with them all big or small (not using the conditional etc) - just get EE to render out the page with multiple videos showing.
- Then work in the conditionals to affect the sizing.
- Then work in the fields/links to other content.
It’s hard to know what to look for with so many big changes going on at once. When things don’t work, you can also start simplifying the template, pulling out code, until you have a bare channel:entries loop returning some simple custom fields. Then once that’s working slowly start adding complexity and other code back in.