I would like to add a new item to the file picker, but I do not know what to do.
I always see a directory portal\0\
How can I change or add path in filepickeruploader ?
<dnn:filepicker id="filepicker1" runat="server"></dnn:filepicker>
DnnFilePickerUploader filepicker = (DotNetNuke.Web.UI.WebControls.DnnFilePickerUploader)Panel1.FindControl("filepicker1");
You can change the path by using the FilePath property.
For example, if you wanted to set the default folder to be "Images/", try this:
<dnn:FilePicker id="filepicker1" runat="server" FilePath="Images/"></dnn:FilePicker>
Use the DotNetNuke.Services.FileSystem namespace. To add a new folder would be:
FolderManager.Instance.AddFolder(PortalId, myPath);
Related
I'm tinkering with blogdown and would like to create figures and table with non-English caption headers. The following chunk
```{r label1, echo=FALSE, fig.cap="Fancy caption", fig.fullwidth=TRUE}
plot(1,1)
```
produces the plot and a caption that reads
Figure 1: Fancy caption
I'd like to be able to change the label such that, say, "Figure" becomes "Plot". I thought I could fix it in the same way as for bookdown: In the _bookdown.yml file I could have
language:
ui:
chapter_name: "Chap "
appendix_name: "App "
label:
fig: 'Plot '
tab: 'Fancy table '
but I'm not sure how to do something similar with a Hugo-based setup from blogdown. How can I add the above information to, say, the config.toml file or set it somewhere else?
First, store the _bookdown.yml file you described in the same folder as the blog post source .Rmd file, e.g. content/post/_bookdown.yml if your file is at content/post/my_post.Rmd.
Then, add _bookdown.yml to the list of ignoreFiles in your config.toml so that Hugo doesn't move _bookdown.yml to the public directory.
This works because blogdown::html_page() is based on bookdown::html_document2(), which will pick up the _bookdown.yml in the same directory of the source Rmd. I don't think it's possible to set this globally from your blogdown root dir, but if you store all your posts in content/post it's basically the same thing.
I want to add dist folder inside my webroot directory and access it from view
for eg
|_webroot
|_js
|_img
|_dist
and access it something like this:
echo $this->Html->dist('filename.ext', ['alt' => '']);
Please give some solution. Thanks
Why not accessing it like this?
$this->Html->css('/dist/example.css');
$this->Html->script('/dist/example.js');
Like the title says I want to create a folder in a specific directory with Adobe Air.
If I use static methods of File like File.userDirectory works fine but I need to give the choice to select the directory.
I am trying this:
file.addEventListener(Event.SELECT, dirSelected);
file.browseForDirectory("Select a directory");
function dirSelected(e:Event):void {
trace(file.nativePath);
file.resolvePath("new_folder");
file.createDirectory();
}
Nothing happens
"resolvePath: Creates a new File object with a path relative to this File object's path, based on the path parameter (a string)."
So:
var newDir:File = file.resolvePath("new_folder");
newDir.createDirectory();
i want to delete images from public:// sub folder pro grammatically. i have paths like this below.
$path = 'http://localhost/Drupal/dbquery/sites/default/files/take_snap/20140713110549.jpg';
i want to delete like this,
$path = 'http://localhost/Drupal/dbquery/sites/default/files/take_snap/20140713110549.jpg';
$del = unlink($path);
but it doesn't delete image. i try to do this from menu call back function. how do i do that?.
In Drupal 7 you can use the file_delete to delete the file and its DB records as well.
these codes work. i just changed the path to relative path like below.
$path = 'sites/default/files/take_snap/20140713110549.jpg';
$del = unlink($path);
Now it deletes file from public sub folder.
i have direcory with variable amount of files.
When starting a C#-windows-form i want to read out all the filenames of a directory and show them in a dropdown-combobox. The selected filename should then be returned when pressing a button.
How can i do this?
Thank you for the help
Solved:
System.IO.DirectoryInfo myPath = new System.IO.DirectoryInfo(myPathIni);
foreach (System.IO.FileInfo f in myPath.GetFiles())
{
comboBox1.Items.Add(f.Name);
}