Velocity Plugin for External Style Sheet not working

Questions and answers on developing, deploying and using plugins and JavaBeans

Velocity Plugin for External Style Sheet not working

Postby ashutoslenka4261 » Wed Feb 21, 2024 11:34 am

Hi All,

My velocity report plugin version is 3.6 . My Developer Servoy version is 2023.12 .IT is NGClient . I have a Template layout . I am using external style sheet . I am giving relative url .When viewed from inside Servoy , css It is not rendering . Then I tried to move the template and css folder to Root directory . I am then giving complete http url for css . I could access the url in the browser. When viewed from inside Servoy , css Still not rendering . I am doing everything correctly. $baseHREF is deprecated .I tried out every possibility . Inline css is working but external css is not working.

Please provide any suggestions..


Thanks,
Ashutos Lenka..
ashutoslenka4261
 
Posts: 7
Joined: Mon Mar 18, 2019 10:29 am

Re: Velocity Plugin for External Style Sheet not working

Postby ptalbot » Thu Feb 22, 2024 11:29 pm

You don't put the template in the ROOT directory.
It should be placed in the repository that is pointed to by the velocityreport.reportFolder path

But you can place the external css in the ROOT directory and then reference it with <link rel="stylesheet" href="http://localhost:$PORT$/your.css" /> where $PORT$ is the port you are running Servoy. For example <link rel="stylesheet" href="http://localhost:8183/your.css" />
On a server, if you are running inside a war context (and not ROOT.war), add this context the url, like <link rel="stylesheet" href="http://localhost:$PORT$/$CONTEXT$/your.css" />, for example <link rel="stylesheet" href="http://localhost:8183/yourapp/your.css" />

It should work.
Patrick Talbot
Freelance - Open Source - Servoy Valued Professional
https://www.servoyforge.net
Velocity rules! If you don't use it, you don't know what you're missing!
User avatar
ptalbot
 
Posts: 1654
Joined: Wed Mar 11, 2009 5:13 am
Location: Montreal, QC

Re: Velocity Plugin for External Style Sheet not working

Postby ashutoslenka4261 » Wed Mar 20, 2024 4:25 pm

Thanks Patrick
ashutoslenka4261
 
Posts: 7
Joined: Mon Mar 18, 2019 10:29 am


Return to Plugins and Beans

Who is online

Users browsing this forum: No registered users and 44 guests

cron