Zend render templates out of scripts folder - zend-framework

i have one problem... In my Zend project I made subfolders in views folder... So beside scripts I also have forms and templates. But when I try to render template in forms folder from some controller it automaticly looks in scripts folder and it set the scripts folder as base path... I found this function:
$this->view->setBasePath("../application/views/forms");
but problem is that it automaticly asume that there is a script subfolder in forms folder. But i dont want to create one because from my point of view is not needed.

That's because setBasePath() does this: Given a base path, sets the script, helper, and filter paths relative to it. Assumes a directory structure of: basePath/ scripts/ helpers/ filters/
Try setScriptPath() instead.

Related

Which folder to put the App and Scene Delegate files in Swift?

I am having a problem to decide on which folder to put the app and delegate in.
My project structure is like this.
Should I create a folder for each of them with their names or create a folder called "Supporting files" ? Can someone give me an advice ?
I usually keep them in my root folder as the rest of the app goes into their own folders.
This is a question of preference I believe that there is no wrong answer here as long as the code inside the files is correct.

What is Header Search Path in Xcode 4.3? How to use it?

I want to add one existing project into my new project. I have added if using "Add files to "Project".
When I'm going to import it's .h file in my new .h file. It say file not found.
I have tried to add Path for Header file in Header Search Path in Search Path. But I don't know how.
Which path I have to add in Header Search Path?
And What is Recursion in Header Search Path?
Suppose u have included a third party library or files say "JSONKit" whose path is outside the project folder and have added in your project then you have to specify that particular folder path in your header search path,else you will get an error.below is an example of it

How to make a project's subdirectory read-only in eclipse?

How can I make a project's subdirectory read-only in eclipse?
The reason I need to do this is that I'm currently learning how to build a child theme in wordpress. I need to be able to view the parent theme's files but sometimes I edit the parent file (e.g. functions.php, style.css) instead of the child's file with the same name.
I know I could set the filesystem attributes recursively to read-only on everything other than my child theme, but I'm wondering if there's a better way? When I do this and I try to edit a read-only file, eclipse shows me a dialog offering to clear the attribute. This is not convenient because if I accidentally press enter or space before I realise there's a dialog, the default is to clear the attribute and then I have to set it again. Ideally I'd like to tell eclipse to not let me edit any files under some specific directories that I choose.
Thanks

Way to shrink Resources folder?

I have 100 pictures in my Resources folder and they can really be annoying when trying to find some other resource. Is there a way I could "create another resource folder" to put the 100 pictures in?
Or do I just have to deal with scrolling and scrolling when trying to find another resource?
You can put files wherever you want in your project-- Resources is just a default folder that gets created for you. You could create a sibling folder to Resources, or a subfolder inside of it.
You can do this in two ways: One by right clicking on the project and creating a new group for the images. This will create the logical folder, but won't actually create a subdirectory on disk. If you want the layout on disk also, create the folder on the command line or with Finder and then drag it into Xcode.
I totally agree with #quixoto ans,
one thing more you can categories your folders according to any visible form.And use proper hierarchy for folders.because when you having number of folder and files then this necessary to make hierarchy also naming conventions are necessary for quick understanding and quick search. (e.g. Make images folder for images and in this folder sub folders, for backgrond image,button images,tab images etc.).so it helps you in quick search.

Maintaining Directory Structure when loading local files into UIWebview on iPhone

I'm noticing a minor annoyance when working with local files in a UIWebview and hoping there is a simple workaround. As a simplified example lets say in my xCode project I have a folder called "WebProject" that contains an html file and a subfolder called "images" where the images reside. The html file references the images as you'd expect: src="images/MYIMAGE.jpg" for example, which works just dandy if this where are normal webpage. When you load the html file in a UIWebview, however, this image would not show up because it seems that all of the files are just thrown into one big bundle folder (so the image link is actually: src"MyIMAGE.jpg"). Is there anyway to enforce the directory structure of these files in the main bundle, so that this sort of thing does not happen? Thanks!
Just create the structure you want in the filesystem (using finder or whatever) and import that whole tree into your project. Make sure you select "Create folder references for any added folders"
You'll notice these folders are blue instead of the normal yellow used for groups. This folder structure will exist in the bundle and so your relative references will work as you expect.
Hope that helps.
See this page and this tech note for how to add resources, and maintain directory structure. Make sure you select the radio button that says "Create folder references for any added folders." Then when you go to write your code, folder-relative paths to the bundle will resolve just as if they are sub-directories. Because they are, even in your app's resources.