Results 1 to 3 of 3

Thread: Image as background

  1. #1
    New user
    Join Date
    02-18-10.
    Posts
    7

    Default Image as background

    Hi all

    I am trying to edit the ce_image.hmtl5 template and add an image as background into a div so that I can use background-size:cover. But for my life I can figure how to parse the image path.

    If I use this:
    <div class="background" style="background-image:url(<?php $this->insert('picture_default', $this->picture); ?>)">


    The rendered source code will look like this:
    <div class="background" style="background-image:url(

    <img src="assets/images/d/test-b28a27ad.jpg" width="1350" height="900" alt="">

    )">


    How can I edit the template to be able to use the image path ?

    I am trying to have the image 100% width and scale with the content. If anyone have a better solution than using the image as background I would highly appreciate it.

    Thanks

  2. #2

    Default

    Use this piece of code inside your template (in your case ce_image.hmtl5) to see what all variables are available for you to use.

    Code:
    <?php $this->showTemplateVars(); ?>
    Hope it helps
    OM MANI PEME HUNG! how many has to die for freedom and dignity. Save this world

  3. #3
    New user
    Join Date
    02-18-10.
    Posts
    7

    Default

    Quote Originally Posted by tsarma View Post
    Use this piece of code inside your template (in your case ce_image.hmtl5) to see what all variables are available for you to use.

    Code:
    <?php $this->showTemplateVars(); ?>
    Hope it helps
    Thanks will give it a try.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •