Image directory for a style

  • I have added a new style which is a variant of default theme. I made a duplicate of default theme from ACP and modified it from there. The issue I am currently facing is, all my input URLs for images directory for the style are getting rejected.

    /wcf/images/smart

    is the directory I want to use. What should be my input in the box which says " Image Path " in style settings. It says

    Zitat

    Path for optional images for your style, directory should be located within “images”.

    Smile , it's good for health

  • Thanks @PJK , that what I used. But, I had to use wcf>style>images>smart to get my background image detected. I am confused now. :(

    Put your images in a wcf/images/smart folder and use something like this in the styles advanced css section:

    background: url("@{style_image_path}background.png") repeat;

  • That's what I did. Then I used inspect element and found that the image is being pulled from within the style directory. so, I had to use that path instead.

    Smile , it's good for health

  • That's what I did. Then I used inspect element and found that the image is being pulled from within the style directory. so, I had to use that path instead.

    Have you changed this at all @{style_image_path}? It should look exactly as it is there.

    • Offizieller Beitrag

    The variable @{style_image_path} resolves to the relative path for your style's image folder. The compiled CSS will be placed in wcf/style/ and if your folder is called smart, then the variable will point to ../images/smart/. This is the whole point of using the variable, to not care about relative or absolute paths and still be able to use them easily.

    Alexander Ebert
    Senior Developer WoltLab® GmbH

  • The variable @{style_image_path} resolves to the relative path for your style's image folder. The compiled CSS will be placed in wcf/style/ and if your folder is called smart, then the variable will point to ../images/smart/. This is the whole point of using the variable, to not care about relative or absolute paths and still be able to use them easily.

    Thank you @Alexander Ebert . Got it, I guess. :)

    Smile , it's good for health

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!