I want to generate rss.xml file in OctoberCMS by manually. Other plugins cannot be customized what I want. How can generate it by my own hand? Any suggestion?
You could use the File::put method to place an XML file within the theme assets public folder.
File::put(themes_path('mytheme/assets/somefile.xml'), $xmlContents);
Related
Newbie question as stated above. How do I access the public folder of laravel in .css file? I have a custom css and I want to get the url of the image.
You can not use the asset() or public_path() functions there, they will not get called from a css file but you can use the traditional way to access file like this
../css/want_to_import.css
This is the only way you can access a file in a css file, unless you're writting your css dynamically then possibilities are different.
If your domain points to your public folder, you can reference it using /
Let's imagine you want to display a JPG file as a background image.
public/image/background.jpg
In your CSS, you can use background-image:url('/images/background.jpg')
I am working on a module for Orchard, and I just want to know how to include a css file.
I have done the following with no result:
Added a folder "Styles" to the root of my module and included a stylesheet and a Web.config file like in this question.
And I have seen this but that's not what I am looking for.
EDIT:
Ok, solution:
When I started working on Orchard I created a new module by just creating a new project in Orchard.Web/Modules folder, but as I read here, my Views/Web.config file has to include some orchard base things what mine didn't because I did not create the module using codegen. I fixed it now by replacing my Web.config file for a Web.config file from another Orchard module, now it works.
Next time I will use codegen to create a new module.
Thanks to endorphin for helping me!
If you want to include your stylesheet in a view, you need to specify this at the top of your view. Where the name of your stylesheet is the filename of the .css file in the Styles folder.
So in your .cshtml file for your view..
#{
Style.Include("your-stylesheet.css").AtHead();
}
I have used AtHead() in the past, but there are other methods to include your stylesheet in different locations (such as AtFoot())
If your stylesheet depends on other stylesheets you can do something a little more interesting by creating a Resource Manifest which is detailed here https://stackoverflow.com/a/6500121/580101
I am using gruntjs to build my src and I want to exclude css/less/*.less from my published folder.
Should I be using the exclude list or is this an issue with the copy task?
Create a .buildignore file and add css/less
i need to change the automatically generated index.html flex output to admin.anotherExtension. I understand that if i change the index.template.html the changes in html level will be preserve when the file is generated, however i need to change the name of the file also, and the extension.
Thank you! (using flashBuilder4)
In the html-template directory. Create a new template file named something like this:
${application}${build_suffix}.template.cfm
The next time you build your project, you'll get a file with the extension .cfm that is the same name as your application. You can use whatever extension of your choosing. My source
If you create your own file in the html-template directory (say: index.cfm ), I'm pretty sure that file will be copied to your build directory, but not changed.
Keep in mind all your changes will be overwritten if you change the Flex SDK on the project. Back them up somewhere.
Is there a method to get all of the .aspx files in my website? Maybe iterate through the site's file structure and add to an array?
Directory.GetFiles(HttpContext.Current.Server.MapPath(#"/"), "*.aspx", SearchOption.AllDirectories);
using Directory.GetFiles("*.aspx"), you can get all the files in the directory. And you can make it recursive to grab any sub directories and their files.
Keep in mind that you can define an .aspx page without having an actual file be there in the web.config.