Results 1 to 3 of 3

Thread: Downloads - content element

  1. #1
    User
    Join Date
    03-28-13.
    Location
    Bietigheim-Bissingen
    Posts
    55

    Default Downloads - content element

    Hi there. Again me, with my noob questions I have a download area where I have .html files, too. I've added in the settings that .html is downloadable, so it shows up in the ce_downloads. But i wouldn't like to force downloading the html files, rather open in a new window. Any ideas how can I solve this?

  2. #2
    User
    Join Date
    03-28-13.
    Location
    Bietigheim-Bissingen
    Posts
    55

    Default

    Hallo, anybody? No ideas? This shouldn't be so complicated, or?

  3. #3
    User
    Join Date
    03-28-13.
    Location
    Bietigheim-Bissingen
    Posts
    55

    Default Found it

    Ok, I found it, and will write it here, if anybody needs this later.
    Create a template for the downloads (ce_downloads) and in the foreach loop, the anchor should be:
    PHP Code:
    <a href="<?php echo preg_replace("/.*file\=(.*)/""$1"$file['href']); ?>" title="<?php echo $file['title']; ?>" onclick="return !window.open(this.href)">
    This will remove the the 'file' get parameter from the link, and will open in a new window.
    If you need to support .html files, too (how was in my case) you need to edit your .htaccess.

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
  •