How to add own custom CSS in prestashop 1.6? - prestashop-1.6

I want to my html template in Prestashop 1.6 framwork
prestashop in which location place css for custome design

Your template folder is located in root/themes/default-bootstrap/
There you have your .tpl like header.tpl, footer.tpl and many others.
If you want to edit a module .tpl file you go to root/themes/default-bootstrap/modules and search for the module you want
Example: Cart located in header you can edit the html by going to root/themes/default-bootstrap/blockcart/blockcart.tpl
If you want to add custom CSS to your template you can add css to your global template file located in: root/themes/default-bootstrap/css/global.css

Related

How to add an image to be used in the customized css file - Swagger UI - Swashbuckle

I'm using Swagger(Swashbuckle) as the documentation tool for our Web API project. I'm able to customize index.html using customized css file.
Everything's works great, except, I want to add our company's specific logo in the index page & I couldn't get it to work.
Suggestions ??
I realize this is an older question, but I just ran into this today. If you want to embed an image file, you can do it similar to how you do for the css and index file.
Add a line in the SwaggerConfig like the following:
c.CustomAsset("mylogo", thisAssembly, "YourWebApiProject.SwaggerExtensions.mylogo.png");
You can then reference that file either in your modified css or custom index page by using <img src="mylogo" /> in your modified html or url(../mylogo) for the path if using it in your custom css file.
Similar to your index and css files, make sure it's set as an embedded resource.
What about including this in your CSS:
.swagger-section #header a#logo {
background-image: url(path/to/my/logo);
}

How to exclude /project/struts/xhtml/styles.css while using <sx:head>

In my project when I add <sx:head></sx:head> it is including some required javascript and css( /project/struts/xhtml/styles.css ) files to implement Ajax. I don't want css files to be included (I have my own defined css) because it is changing my page format.
How to do that?

Relative filename in ERB files

I am putting my ERB files in app/view. The problem is that sometimes I make mistakes when including CSS and JS files. I refer to them as "js/include.js" or "css/default.css" instead of /js/include.js and /css/default.css
However, these files are located in the public directory not the app/views directory so as a result the page breaks.
Is there a way to change the default behavior so that it looks in public folder whenever I refer to these files relatively?
If you stick with the Rails conventions you'll save yourself some grief. Use stylesheet_link_tag and javascript_include_tag in your layouts. And don't scatter css and js includes around your views. Use custom layouts instead.
For example, if you have an admin interface with a different look and different behavior you could add app/views/layouts/admin.html.erb. Then, in AdminController specify that it should use the admin layout. You can also specify the layout at the controller action level if you need to.

Cannot import the CSS in JSF pages

I'm learning to use ADF on Oracle jDeveloper 11g.
I created an ADF Fusion Web Application (with the WebLogic webserver) and I created a JSF page under \ViewController\public_html. Then I created a CSS skin file (for JSF) and I put it under \ViewController\WebContent\resources\css\
I want to apply such style rules to the JSF page. To do this I put it into such page the line
<h:outputStylesheet library="css" name="prova.css" id="CASD"/>
where prova.css is the name of the CSS file I've created.
It doesn't work, neither using /css instead of css or /resources/css, etc.
Try using <af:resource type="css" source="your source path here" /> instead.
You shoud make a skin and add your page. When you make a skin
the name of skin is set in trinidad-config.xml in your project:
<skin-family>skin2(name of skin)</skin-family>

Asp MVC 3: Dynamically resolve relative resources in views

I have a javascript application that runs in a view (index.cshtml).
Problem:
The problem is all relative paths are relative to the current url, which would be ok in a simple html webapp but not in asp mvc. The js-app shouldn't have to bother whether it's served in a normal html file or via a asp mvc page.
I.e. http://www.domain.com/<controller>/<action>/ contains a script test.js. This script loads an external xml file searching relative to it ie. "data/data.xml". The resulting url reads http://www.domain.com/<controller>/<action>/data/data.xml. This isn't found.
Question:
Is there a way to route static files (images,..., maybe even js files) to the content folder like "~/Content/controller/action/<pathToFile>/"?
Any help appreciated!
Lg
warappa
PS: I know about Url.Content() but that doesn't fit here.
The solution doesn't require mapping - just a simple html tag in the header:
<base href="#(Request.Url.GetComponents(UriComponents.SchemeAndServer, UriFormat.Unescaped) +
Url.Content("~/content/controller/action/"))" />
Lg
warappa
EDIT
Some browsers need an absolute url - sample updated.
In you can use absolute URL addresses to access you static resources:
$('img').attr('src', '/Content/Pictures/picture1.png');
or
<script src="/Scripts/script.js"></script>
This way you will allways get the same resources relative to the page base address, no matter if you load the script in a /{Controller}/{Action}/{View}, {Area}/{Controller}/{Action}/{View}, a custom route or even in a static script html page.
Or perhaps what you're looking for is the use of css files, since CSS's url('<path>') resolves the addresses relative to the CSS file's location. You would just need to import the one CSS file that had all the resource (image?) file paths. Then the scripts could reference the distinct class names, thus not being location aware at all. This is what libraries like jQuery UI do. But again this would require a fixed folder structure relative to the CSS document.

Resources