"chat.ejs" file shows before "index.ejs" file - ejs

I currently want a home page written in ejs, named "index.ejs" and a secondary chat function called "chat.ejs"
Here is the current file path
Image 1
The file named "chat.ejs" displays before "index.ejs"
How would I make index.ejs display first?
Thanks!
Colin

Related

Tag prefix Win CC

I am busy with a C script in Siemens WinCC.
I would like to open a faceplate on in which I can open other faceplates.
Howerver, I would like to use the Tagprefix from the first faceplate in the second. Does anybody have an idea how I can give the tag prefix through?
Thanks in advance!
Tom
As You know, the tag prefix is a property of the screen window. You need to provide that data to the script running in the context of the picture inside the picture window from the parent screen window.
One solution is by using a text field "tagname" in the "faceplate" and use that as a source of the tag-prefix name. The tag-prefix can be transferred by a simple vbs script that runs "on open".
Use VBS "Item.parent.TagPrefix" and then give the result to the text field.
Or just from a button in the picture "Item.parent.parent.TagPrefix" is also ok.
The same in C would use the functions "GetParentPictureWindow", and return a string(lpsz) containing the name of the picture window. This name can be used to read the property of the object with this name using "GetPropChar" using "Tagprefix" as the property.
//PerD

Matching of data files to pages

I have used the assemble/boilerplate-site as a test bed. Following the examples on http://assemble.io/docs/Data.html I have created a page named test.hbs and a data file named test.yml.
The yaml file contains:
title: stuff
when running grunt assemble, a test.html page is assembled into the destination directory. if my test.hbs contains the tag {{title}} the title is not added from the data file, however a tag of {{test.title}} does add the title from the data file.
on the docs page http://assemble.io/docs/options-data.html it states:
When using "external" data files (versus YAML front matter), if name of the data file is the same as the associated template then Assemble will automatically associate the two files.
I also need to use the {{title}} tag in my layout. This works if I use YFM at the top of the page rather than an external data file.
Am I misunderstanding how external data files are associated with a page or am I missing something?
You can use {{page.title}} in your test.hbs and layout.hbs files to access the variable without having to specify the actual page name.

Add information in zend form and file upload fail

I have 2 problems. The first problem, that I have 2 input file (Zend_Form_Element_File) and each one of the input file have to redirect the file to a different directorys. I use Zend_File_Transfer_Adapter_Http to up the files.
the files to view related with the problem is:
Controller / Form / Upload Class
http://pastebin.com/6hTADeMQ
The other problem it's that I have to show a name of file related with the record that I load in Form when I edit a record. How I can insert a div and print this information. Follow the Zend Form File: http://pastebin.com/TPAaiEPz

How to match different text fields which are located in two different UnityScript files?

I am going to create two pages. In one page I create a textfield and a button. In text field I am going to write something. After click it on the button the next page will appear. I can move page from one page to another by using Application.Loadlevel(). In the second page, I have only one text field. I want to show the previous textfield value on the next text field, which is located in another page. But I can't do that thing. Please help.
This is one solution:
You can access fields (variables) in one script file which are present in another script file, this can be done my making that variable global, this way you can access it in another javascript file.
You need to make the text in the textfield global, so that you can access it in another script file (javascript in your case).
Global can be declared like this:
// The static variable in a script named 'TheScriptName.js'
static var someGlobal = 5;
// You can access it from inside the script like normal variables:
print(someGlobal);
someGlobal = 1;
And it can be accessed in another javascript like this:
TheScriptName.someGlobal = 10;
Link to Global in Unity Script Reference

how to refer one .phtml in the other views in Zend

am new in Zend framework.
I have one .phtml file, includes menus section. i need to add that .phtml file in to the views i.e views/scripts/index.phtml page.
how can refer that
please advice
thanks in advance
You can use the render helper:
<?=$this->render('menu.phtml')?>
If you want to pass specific variables to the rendered script, use the partial helper:
<?=$this->partial('menu.phtml', array("varname" => "value"))?>
The menu.phtml file must be in the search path, which usually is the path to the current module's scripts directory ( view/scripts ). You can either place the menu.phtml file in this directory, or add a directory to the search path using the addScriptPath() method on the view object.
Try this
echo $this->partial('path/file.phtml', 'ModuleName')