This is a sticky one for me, I've been fiddling around for hours with no luck.
The issue:
Stylesheets are being rendered out starting with /OrchardLocal/ all the time when running a site in WebMatrix. This causes stylesheets to not be found. Scripts URL's are fine. My theme is based on The Theme Machine theme which comes with orchard. When I'm adding style/script references into Layout.cshtml I am using the following code (as an example):
Style.Include("style.css");
Script.Include("script.js")
Replicating the issue:
Use ClickToBuild.cmd to compile a the site in release mode, then open the site in WebMatrix using the path: \build\Stage
The styles/scripts will be rendered out as (notice the OrchardLocal):
<link href="/OrchardLocal/Themes/MyTheme/Styles/style.css" rel="stylesheet" type="text/css" />
<script src="/Themes/MyTheme/scripts/script.js" type="text/javascript"></script>
I have tried changing the Base URL in in Orchard Admin --> Settings but this makes no difference.
Thanks,
Andrew
Turns out it was an issue with a module called Combinator. Despite excluding everything from being combined in the Exclude setting it must cache the stylesheet paths from when running in development. I also found records containing the stylesheet paths within the module's database tables. Emptying the cache within the Combinator settings resolved the issue.
Related
I've been learning how to use tailwind css by following the offical video tutorial and I just wanted to try to deploy the site example to Netlify to see if it works using the drag and drop feature.
This means taking the entire project folder and dumping it into netlify. This usually works with vanilla html css js sites but for some reason I get the error
Page Not Found Looks like you've followed a broken link or entered a URL that doesn't exist on this site.
This is how the project structured looked like:
What am I doing wrong? Inside the build folder there is another file called tailwind.css
On your Netlify dashboard, change the publish directory to the directory where your index.html file resides: public/. That should do it.
You can also, as you said, take everything out of the public folder and put it at the same level as the other folder and files, which makes the index.html available at the root of the project. However, then you lose your project's file organization.
I've fixed the problem.
The trick was to take everything out of the public folder and put it at the same level as the other folder and files.
This would make the index.html file available at the root of the project and would allow the site to work properly once deployed.
Okay, so I've searched everywhere and while I can find plenty of stuff about moving a Drupal install out of a subdirectory I can't find anything on moving one into a subdirectory. I've recently taken over this project and it was developed without me so I've been landed in it here.
The problem is that the site was developed in the root of a dev server and I now have someone who wants it in a subdir. I've changed the base url in the htaccess and I've tried manually changing references in the CSS and DB but I can't be sure I've caught everything (modules etc).
What I want to know is, is there a way to force every link relative to the root to be relative to root/example instead. Basically everything that was once at www.example.com is now at www.example.com/subdirectory.
Thanks.
There's two pieces to this. The first you've already done: configuring htaccess to set a base url that includes the subdirectory.
Unfortunately, you may have quite a few references in the node content (especially embedded images) that will stop working.
A relatively simple solution to this would be to include a <base href="foo.com/dir" /> tag in your site theme, but this isn't a great fix in the long term.
You can try modifying your database directly, through queries such as the following (use with care, backup your database ahead of time, etc):
UPDATE field_revision_body SET body_value = REPLACE(body_value, 'devdomain.com', 'proddomain.com/subdir') (add http:// into those queries)
You may also need to update the paths in your files table to reflect the new locations on disk, especially if you're using multisite.
Alternately, have you considered using the Backup & Migrate module to move content from the dev server to a new install at the new instance?
If you create a new nanoc site, and then run nanoc view, it works well. The CSS, pathing, and assets are correctly handled. However, when I run a nanoc compile, it's not handled the same way. I get broken CSS, broken paths etc.
What is causing this - I assume it's the rules and
Compile only generates files in /output. Opening one of the html files there is possible, but as the docs state, your browser will not be able to find the CSS files.
Either use nanoc view to load CSS files correctly, or use a local web server to view the files. (Note: nanoc view is nothing more than a local web server).
I start to build DNN taskMagnager moduel and I need to use the controls in acsx page
C:\inetpub\wwwroot\dnndev\controls
the problem is that my project folder path is
C:\inetpub\wwwroot\dnndev\DesktopModules\TaskManager"
and when Im trying to go to path like this:
<%# Register TagPrefix="dnn" TagName="label" **Src="~/controls/lablecontrol.ascx"** %>
the src cant be found!
No matter what I do its always turns to
C:\inetpub\wwwroot\dnndev\DesktopModules\TaskManager\="~/controls/lablecontrol.ascx
I tried everything: tilde(~), /../..
Nothing works!
It should be
<%# Register TagPrefix="dnn" TagName="label" Src="~/controls/labelcontrol.ascx" %>
I'm assuming that you're referring to an error within Visual Studio, right? Is there an actual error when you run the application?
One thing that you can do within Visual Studio to help it be less confused is to set the Root Application path in the project settings. Go to the Web tab in the project's settings, make sure you're setup to use IIS, and point the Project URL to the TaskManager folder (e.g. http://dnndev/DesktopModules/TaskManager), and then check the Override Application Root URL checkbox, and set it to the root of the site (e.g. http://dnndev). This will usually let Visual Studio figure out where the label control is correctly.
Also, it looks like you're using LableControl instead of LabelControl.
I want to change look and feel of liferay using css. i am very new to liferay. Can any give me any idea to do the changes. Thanks in advance
The step-by-step seems complicated, but it's not that bad .....
1a) download and unpack the plugins sdk for the version of liferay you want to use. All the downloads are on the sf page http://lportal.sourceforge.net/
1b) make sure you have the latest version of ant and the JDK version that matches your liferay version (1.5.x or 1.6.x)
2) there are a few main folders in the kit. Change into the "themes" folder and run the create script there in this format (on linux or mac you'll need to make the .sh files executable)
c:\liferay\plugins\themes >create my-name "My Theme Description"
linux/mac $>./create.sh my-name "My Theme Description"
This will create a skeleton theme in a folder called my-name-theme and a folder within it called _diff.
Make whatever modifications you want WITHIN THE _diff FOLDER. (except changes to the properties file within WEB-INF)
Once you've made changes run "ant compile" from within the my-name-theme folder and the sdk will run through it's paces and spit out a .war file to the "dist" folder in the sdk root. You can upload this to the site using the plugin installer
OR ... if you configure the sdk to know where your development server is you can run "ant deploy" from the theme's folder and let the autodeploy magic in liferay do the work.
Once the theme is installed just assign it using the "look and feel" tab in the "manage pages" tool.
TIP : Make most of your changes to the custom.css file .... keeps things easy to upgrade.
TIP : Development is really slow for CSS if you do this for every change .... so if you're running a dev server add a style tag just before the end of the head tag that points into your _diffs/css folder. href="file:///...../_diffs/custom.css". This way whatever edits you make will be compiled into the next version of the war and will override the currently installed version without reuploading. make sure to remove the link before you put it on a live server.
The liferay.com documentation is great and there's a "themer's guide" i can't find the link to right now that got me started.
We've done a number of LifeRay customizations for various companies but your question is too vague for us to answer. If you are just looking to change a few colours and fonts then editing the CSS is fine, but if you are looking to completely change the layout then you need to delve in to the template files and start working with the XHTML.
Provide more details and we might be able to prod you in the right direction :D
IMO theme development for liferay can be quite slow to start with. I have found two different approach quite useful. It works for me, might work for you as well.
If you edit files inside _diff folder AFAIK you have to deploy every
time two see the changes , which can be quite frustrating for
front-end developers. An approch can be edit the css file directly
in tomcat/themename folder. Copy the changed every couple of hours
or so in the _diff folder and deploy. In my case the CSS stays in
C:\liferay-portal-6.1.0\tomcat-7.0.23\webapps\\css\
Also if you are aware liferay supports Sass now. So it you are writing Sass "deploy" may be you most likely option. But I have also figured out a way to speed up that process. Install ruby (if you are in windows, in Mac its preinstalled) > Install Compass > and create a blank compass project. Start "compass watch" . Open bothe scss file and the compiled css file in your IDE. "compass watch" will poll for changes in your scss file and put the compiled output in the css file. Every while you may copy the css output in the css file in theme folder or directly in firebug or web-inspector in chrome/safari.
I have found these are faster dev practice than deploying everytime or completely developing on firebug/web-inspector.
Also if anyone know of better method, specially things like only CSS/JS deploy (or simple copy for that matter if one is not writing Scss), please let us know.
You can make your custom style with the liferay plugins sdk, which can be found here: http://www.liferay.com/downloads/liferay-portal/additional-files
There is a themes folder included, in which you can create a new theme. Liferay generates here a basic theme as a boilerplate, which then you can customize and deploy to your liferay installation.
You can
mvn archetype:generate
then select “liferay-theme-archetype (Provides an archetype to create Liferay themes.)” et voilà you are ready tu customize your theme.
Best practice recommends that you make all your custom themes using only the custom.css file, and that you not override any of the templates unless absolutely necessary. This will make future upgrades far easier, as you won't have to manually modify your templates to add support for new Liferay features.
Deploy the newly created theme using
mvn clean package liferay:deploy