Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • mazhar shah Friend
    #934097

    I can change the new theme background colour to #cccc by changing the file /mytheme/template.less using this code:

    //background 
        .container-hd {
        background: #cccccc;
    }
    

    How can I add a background image (repeat x and/or repeat y)

    (assuming image is in the backgrounds folder – path ../images/backgrounds/)

    IMPORTANT: IMAGE NEEDS TO BE SCALABLE when the window goes smaller.


    1. layout-help-for-expo-1-1
    mazhar shah Friend
    #934605

    any advice on this please?

    mazhar shah Friend
    #934981

    I have tried so many options from the T3 forum nothing works. .container-hd {

    // background-color: #f4f4f4;
        background: url("../../../layout/expo/bg_top1.jpg");
         background-repeat: repeat-x;
         //background-repeat: no-repeat;
    }

    neither does this path work ../layout/expo/bg_top1.jpg"

    mazhar shah Friend
    #935029

    I am sure my image path is correct. Plus i am adding it to template.less file . It works if i change a background colour, but why wont it load a background image???

    mazhar shah Friend
    #935247

    Still desperate for some help.
    My images are in the standard joomla images folder path ../images/backgrounds/

    I think I know where I may be going wrong. I think I need to use this in less file

    @base-url: "../../images/";
    
    Is this path correct AND IF SO, WHICH LESS File do I add this to? 

    and then use this in template.less file

    @background-image : url ("@{base-url}/backgrounds/bg.png");
    

    THEN I need to compile less to css? Can someone please confirm whether this is correct or not.

    Will this solution give me scalable background image??

    Saguaros Moderator
    #935955

    You should also post your site’s URL in the topic so I can have a look.

    mazhar shah Friend
    #936342
    This reply has been marked as private.
    mazhar shah Friend
    #936653

    Hi Saguaros

    Any update? This is day 9 waiting for some help. Please?

    In Firefox inspector, the file path is showing correctly,
    .container-hd {
    background-image: url "../../images/themes/dark/bg_top1.jpg";

    but the whole line is deteleted and the error shows as

    Use of getAttributeNode() is deprecated. Use getAttribute() instead.

    mazhar shah Friend
    #936714

    Just noticed the template JA Elicyon also has a body background image. How do you do that?
    The forum on that shows there was a fault in the template
    ref: https://www.joomlart.com/forums/topic/body-background-image-is-not-showing/

    IS THIS A BUG IN THIS JA HEALTHCARE TEMPLATE TOO??

    mazhar shah Friend
    #936759

    What is happening with support?? I have been a member for years, never encountered such an issue with support. This is the 9th day and nothing??????? At least acknowledge your customers…please??

    Saguaros Moderator
    #936919

    Hi

    It’s wrong path so that it raises that error as you see in inspect element.

    In JA Elicyon, we add a new parameter for template to add background for body. Here are steps:

    • Go to file: ROOT/templates/ja_healthcare/templateDetails.xml

    Add new field for image background:

    <fieldset name="theme_params" label="T3_THEME_LABEL" description="T3_THEME_DESC">
        <field name="background_img" type="t3media" default=""
                 label="T3_THEME_BG_IMG_LABEL"
                 description="T3_THEME_BG_IMG_DESC"/>
    </fieldset>
    • Go to file: ROOT/templates/ja_healthcare/tpls/default.php

    Edit to this:

    
    defined('_JEXEC') or die;
    $bg  = $this->params->get('background_img', '');</p>
    <p>if($bg) {
    $bg = 'background-image: url(&quot;'.$bg.'&quot;)';
    }
    ?></p>
    <p><!DOCTYPE html>
    <html lang=&quot;<?php echo $this->language; ?>&quot; dir=&quot;<?php echo $this->direction; ?>&quot;
    class='<jdoc:include type=&quot;pageclass&quot; />'></p>
    <head>
        <jdoc:include type="head" />
        <?php $this->loadBlock('head') ?>
        <?php $this->addCss('layouts/docs') ?>
    </head>
    <body>
    
    <div class="t3-wrapper" <?php if($bg) echo 'style="'.$bg.'"'; ?> >
    

    I attach both of these 2 files here so you can make a comparison.

    Once done, you go to Backend > Extensions > Template > select template style of JA Healthcare > Themes tab > you see a new param for background image and browse to your desired image

    In JA Elicyon template, we put image in directory: **ROOT/images/joomlart/demo/your_image_here**


    1. healthcare.zip
    mazhar shah Friend
    #937046

    Hi Saguaros, thank you so much for your help. we are on holiday here today, but i will try this as soon as i can. Thank you again 🙂

    Saguaros Moderator
    #937047

    You’re welcome, let me know then

Viewing 13 posts - 1 through 13 (of 13 total)

This topic contains 12 replies, has 2 voices, and was last updated by  Saguaros 8 years, 5 months ago.

We moved to new unified forum. Please post all new support queries in our New Forum