What is a direct link to a stylesheet?
What is a direct link to a stylesheet?
I would like to import CSS style saved in CMSMS into an external website.
With the old {stylesheet} tag there was a possibility to call stylesheet in this way:
/stylesheet.php?cssid=42
Now, when there is only {cms_stylesheet} tag, and "stylesheet.php" was removed, is there any way to get a direct link to the CSS file?
Thank you,
Augustas
With the old {stylesheet} tag there was a possibility to call stylesheet in this way:
/stylesheet.php?cssid=42
Now, when there is only {cms_stylesheet} tag, and "stylesheet.php" was removed, is there any way to get a direct link to the CSS file?
Thank you,
Augustas
Re: What is a direct link to a stylesheet?
I don't think you can link directly, because the CSS code is stored in the database and then compiled and temporarily cached in the 'tmp/cache' directory. That file is being deleted and recreated randomly (during cache clearing).
There are some modules that can export your theme into files, though, look them up at The Forge.
There are some modules that can export your theme into files, though, look them up at The Forge.
Re: What is a direct link to a stylesheet?
You can always copy stylesheet.php from an older install.
Re: What is a direct link to a stylesheet?
you can use name= to call the stylesheet with a specific name...
Ronny
Ronny
Re: What is a direct link to a stylesheet?
Ronny, could you write an example of full URL?RonnyK wrote:you can use name= to call the stylesheet with a specific name...
"name=" is just a parameter for the URL.
But which .php file I should call?
Re: What is a direct link to a stylesheet?
I don't think it is a good idea, as officially this file is not anymore inside the CMSMS distribution, so I prefer not to stick to old codes for security and compatibility reasons.Wishbone wrote:You can always copy stylesheet.php from an older install.
Re: What is a direct link to a stylesheet?
The stylesheet is not a 'file'. It is generated during the call. And with the caching/combining that is happening, is the stylesheet created/stored and called from the cache folder.
If you want a static file for CSS, then you could copy/paste the data to a static file, and call it as a static file, so not using the stylesheet-db logic....
But I dont see the specific use for calling a 'file'...
Ronny
If you want a static file for CSS, then you could copy/paste the data to a static file, and call it as a static file, so not using the stylesheet-db logic....
But I dont see the specific use for calling a 'file'...
Ronny
Re: What is a direct link to a stylesheet?
Not sure you understood my initial question.RonnyK wrote:The stylesheet is not a 'file'. It is generated during the call. And with the caching/combining that is happening, is the stylesheet created/stored and called from the cache folder.
I wish to have a direct link to the CSS file, which I could use in another website. Namely, a company has CMSMS site and Wordpress blog. My wish is - in both CMS systems (cmsms and wp) to use the same stylesheet file. I.e. in case an update in CSS is needed - then it could be done just in one place - e.g. in CMSMS, and all the style changes are reflected automatically in Wordpress page.
Obviously I cannot use {cms_stylesheet name='xxx'} code in Wordpress templates. So with older CMSMS versions I used to call CSS file with:
/stylesheet.php?cssid=47
Since CMSMS 1.10 stylesheet file has a temporal URL like this:
/tmp/cache/stylesheet_combined_89f4e8cbdcb9415f0f04ff04d6cf58e5.css
But this URL is only temporal and once cache is refreshed -- this file will not exists anymore. That is why I am asking if there is any other way to have a permanent & direct link to CMSMS stylesheet. And when CSS changes are made in CMSMS Admin -- then those changes would be instantly visible in Wordpress blog which is importing CMSMS stylesheet.
I hope my situation got some more clarity.
Thank you
Re: What is a direct link to a stylesheet?
OK..
then I think that you could go with a static stylesheet, which is not maintainable from the backend, but can be called with the..
<LINK HREF="basis.css" REL="stylesheet" TYPE="text/css">
so instead of a db-stylesheet, just take the content of the generated one that you mentioned, put the content in a static file under /uploads, and link with a static css-call to that file.
Ronny
then I think that you could go with a static stylesheet, which is not maintainable from the backend, but can be called with the..
<LINK HREF="basis.css" REL="stylesheet" TYPE="text/css">
so instead of a db-stylesheet, just take the content of the generated one that you mentioned, put the content in a static file under /uploads, and link with a static css-call to that file.
Ronny
Re: What is a direct link to a stylesheet?
This is exactly how I do it now.RonnyK wrote:then I think that you could go with a static stylesheet, which is not maintainable from the backend, but can be called with the..
<LINK HREF="basis.css" REL="stylesheet" TYPE="text/css">
Which means someone has to keep an eye on CSS changes made in CMSMS, and once there are some changes - the static stylesheet for Wordpress should be updated manually...
Re: What is a direct link to a stylesheet?
Or you call it in CMSMS itself from the static one as well....
Re: What is a direct link to a stylesheet?
Yeah, that's an idea!RonnyK wrote:Or you call it in CMSMS itself from the static one as well....
Re: What is a direct link to a stylesheet?
I think using the old stylesheet.php file for this would actually be a very good solution. It provides you with exactly the script you need to use a CMSMS stylesheet on a different website.
Of course, you can still use the new and modern {cms_stylesheet} tag on your CMSMS website.
Of course, you can still use the new and modern {cms_stylesheet} tag on your CMSMS website.
Re: What is a direct link to a stylesheet?
But using this old file does not guarantee that with the next CMSMS update this old stylesheet.php code will work. Looking to the long-run, I think best would be to avoid old version codes.mcDavid wrote:I think using the old stylesheet.php file for this would actually be a very good solution.
Re: What is a direct link to a stylesheet?
There will never be any way to guarantee any kind of compatibility with other CMS's in the future. You will always have to maintain that yourself.