how to set zend form details in application.ini - zend-framework

Is there a way to set zend form details in the application config file (application.ini) in Zend Framework. I am looking for a way to move following details to config
A way to disable form decorators by default
set element Prefix Path
default decorator for different element type
validator path
plugin details

Well you can check this link from the Zend Manual itself. It talks about using ini files to configure a form:
Using a Zend_Config Object
You can add various configurations to your ini file and apply them to the form itself.

Related

Howto to configure TCA settings and save them globaly

I'm configuring a new website with TYPO3 v. 9.5.
I would like to configure TCA settings to make it possible to force editors to fill fields in content elements like media or news.
In former times I was able to put this settings into a file typo3conf/extTables.php.
In my investigations I found, that I have to put configurations into a directory Configuration/TCA/Overrides of an extension.
I tested it with the extension tx_news like this:
I put this code in a file called test.php as a test and example.
This code forces the editor to always enter an archive date.
This works for me, but after an extension update, this code might be lost and I cannot configure the fields of core extensions for example to force an editor to always enter a title of a content element.
My question is, how can I store this configurations update save within the configuration environment?
Thank you in advance,
Ralf
Depending on your modifications you need to consider some aspects:
always use a filename according to the table your modifications belong.
so for the news records it should be: Configuration/TCA/Overrides/tx_news_domain_model_news.php
make sure your modifications are loaded after the first initial configuration: make a dependency to the original extension.

TYPO3 template extension- not able to change Mask back-end configuration and Page Tree not properly imported

I have created a TYPO3 template extension using the following method:
1.1 via Extension Manager
Open the module "Extension" in the TYPO3 Backend and search for the mask Extension.
Click on the configure icon at the end of the row.
Now you should be able to change the settings.
Changes are stored in typo3conf/LocalConfiguration.php.
Facing the following problems:
1.We created the folder/extension as mentioned. While installing this extension we have to change Mask back-end configuration. This is not working.
2.Page tree contents are not properly imported i.e. all page contents are missing.
Please let me know if you need further details.
We have a working configuration where we stored the full mask-configuration as part of our site-extension.
As designed you need to configure mask before you start to define any CEs, so that all CE definitions are stored in the correct folders.
For the rendering you also need to include the static template of ext:mask.
Our configuration is:
This configuration is stored in typo3conf/LocalConfiguration.php as there goes every configuration done in the extension manager.

How to create custom template of Typo3 bootstrap_package

I am quite new in typo3. I read somewhere
You should never edit the original templates of an extension as those changes will vanish if you upgrade the extension
How to create my own custom template based on bootstrap_package extension? I would like to override some files in parital/layout. It would be great if someone can post like/tutorial.
A folder structure and a simple custom typoscript that implement bootstrap_package for my custom temple would be great help.
The bootstrap package developers already added something for this. It is possible to set different locations, where templates are stored. It also uses a fallback solution, that means if a template is not found, it will fetch the original one from the extension.
Create a directory in the fileadmin directory, for example fileadmin/templates/BootstrapPackage. Inside this directory, create the directories "Templates", "Layouts" and "Partials".
In TYPO3 backend, go to the constant editor of the root page and select everything like the screenshot says:
Set the fields "Layout/Partial/Template Root Path" to your new created directorys (fileadmin/templates/BoostrapPackage/Layouts|Partials|Templates). Save and clear the cache.
Now you can create new templates. If you place an exacly named file like it is named in bootstrap_package/Resources/Private/(Layouts/Partials/Templates)/Page/ , TYPO3 will use the new template instead.

Finding theme files of Magento

I want to do some changes in magento theme actually product detail page, but I am unable to find that what theme it is. There are 4 directories where files can be.
In app/design there are 2 directories, default and base and then further more
And same is hierarchy in skin folder
So is there some place where I can see that which files are being used or is there some variables or functions in magento that I can use to check that from where it is getting file. I don't know much about magento and zend framework. I tried to echo some content in product_controller but it seems that I am not printing output in write file. So what can be the way for me to know that where is the file of product detail page view where I can add a form and some link, is there any sort of custom HTML in magento that I can add in product detail page? I actually want to have a form in it that will take it to anohter page that I will create in magento and that page will use some data from form. Or if there is some extension for it?
Please tell if you know any thing about it , that is really appreciated.
thanks
You can find out where your themes set from
System > Configuration > Design
System > Design
turn on template hints from System > Configuration > Developer
or you can add print_r(get_included_files()); to the end of index.php to see what files are actually used in current php page
You can find out which is set from following place
System > Configuration > Design
System > Design
here you can see the name of theme who layout,templates and skin is used
then u can explore the folder having the same name as files from that folder are in use.

Fatal error: Class 'Zend_Form' not found

I've started using Zend framework, and Im following this simple Zend form tutorial. The form is located in application/forms directory I have included the Zend framework in the Path (by going to computer properties). However when i access form.php page, i get this error:
Fatal error: Class 'Zend_Form' not found
I have also tried by copying the Zend folder from the Zend framework in the library folder of the application, however error still remains same. Thanks.
It sounds like you are confusing two notions: the system path and the include path.
The system path is an operating system concept. When you ask the OS to execute a command, the system path is a list of places to look for the executable.
In contrast, the include path is a PHP concept that tells PHP a list of folders in which to look for files invoked by PHP include/require statements.
Any path that you find in "Computer > Properties" is almost certainly the OS-level system path. What you need to do is to make sure the Zend folder on the PHP include path, either by moving the Zend folder or by modifying PHP's include path to include a point to the Zend folder.
In a typical ZF app, the include folder is set in index.php (the front controller). So, the only explanation for not finding Zend_Form is that the autoloader is not being instantiated.
If you are using Zend_Application, this happens automatically. However, it seems like you are bypassing public/index.php and the whole Zend_Application instantiation by trying to directly "access" a file called form.php directly. If this file contains only the definition of your form (extending Zend_Form), then the absence of autoloading could easily explain the error message you are getting.
I'd try instantiating the form in a controller action, by which time in the request processing cycle, the autoloading is probably already in place.
[At that point, given the file locations you cite, we might run into a resource-loader issue, but that's a somewhat different issue that can be handled by instantiating a Zend_Application_Module_Autoloader in your Bootstrap.]
It looks like you do not use Zend_Loader. You should focus on it.
You can also manually in your custom form class include Zend_Form class.