To change the layout of Content

7 replies [Last post]
Joined: 07/06/2009
Points: 10

Hello,

I am using Kaltura in drupal and it is working great. I need to change the layout of content, which is currently dispalying at the bottom of thumbnail image.

Can i change the layout of right side to the content which is displaying

tag. Kindly help me in this issue.

Thanks & Regards,
R.Janakiraman.

Joined: 03/29/2009
Points: 764

Hi,

I'm not sure I follow - can you please post a screenshot / a link to clarify?

Thanks!

Joined: 07/06/2009
Points: 10

Hi IdoSet,

I have attached the screenshot which is currently displaying my content. I need the teaser to display in right side and the video block to display in the left side( as it is).

So I could see the content as Video in left, Teaser in right. Could you please help me to fix this issue.

Thanks & Regards,
R.Janakiraman.

AttachmentSize
page view.jpg127.98 KB
Joined: 07/03/2009
Points: 9

Hi Janakiraman,

In your theme folder, you will find a file called node.tpl.php.

Just copy this file, and rename it to node-kaltura_entry.tpl.php (or whatever kaltura node-CONTENT_TYPE.tpl.php you are using), where you have access to your node properties.

I'll include an example of what I mean, to format or change the layout of your media nodes.

PS: I'm using a Zen Subtheme :)

AttachmentSize
node-kaltura_entry.tpl_.php_.txt6.41 KB
Joined: 07/06/2009
Points: 10

Hi kimbo,

Thank you for your quick reply. I will try this.

Thanks & Regards,
R.Janakiraman.

Joined: 03/29/2009
Points: 764

Kimbo - thanks a lot for posting this.

Janakiraman - please keep us updated.

Joined: 07/06/2009
Points: 10

Hello Kaltura Gurus,

I have attached node.tpl.php file from my zeropoint theme. I have changed the content div like the following,

<div class="content">
 
  <?php if(isset($node->content['kaltura_entry']['#value'])):   ?>
                <div style="float:left; width:55%">
                <?php print kaltura_replace_tags($node->content['kaltura_entry']['#value'], FALSE, FALSE); ?>
                </div>
                <?php if ( $node->content['body']['#value'] ) : ?>
                <div style="float:right; width:35%">
                        <?php print $node->content['body']['#value']; ?>
                </div>
                <?php endif; ?>
        <div style="clear:both;"></div>
  <?php else : ?>
    <?php print $content ?>
  <?php endif; ?>
  </div>
[code]

The above coding is satisfy my requirement. But when I look the home page, it is also listing with the same alignment as per the attachment image2. Please help me to fix this css issue.

Thanks & Regards,
R.Janakiraman.

AttachmentSize
node.tpl_.php_.txt1.51 KB
image2.jpg108.93 KB
Joined: 07/03/2009
Points: 9

Hi Janakiraman,

The fact is that your node template only specifies the layout for a full node view.

You should include an 'if' check if the node your are requesting is in teaser mode (for ex. on the homepage, or a list view) or in full node mode ( the node itself as a page).

Please view the included template in my previous post for more information on how to check for teaser / page mode.

Greets!