When we use this command (for example);
phalcon scaffold products --force
what is the benefit of "--force"? Please explain for me...
That option overwrites any modified file generated before by the same command, if you run the scaffold passing this option, you'll lose any changes, however the new generated scaffold will generate the files with fields added/modified/dropped in the table.
Related
Since updating from Flux 6.0.2 to the newest Flux TER-Release (7.0.0) I have the problem that all my defined flux:field.select items are switched. I have them defined as an array like this items="{0: {0: 'value shown as a CSS class in the frontend',1: 'value shown in BE'},}". But now I get the BE value in the frontend template.
Also all my content elements from my provider extension are shown twice (without a title) in the backend and the fields defined in the 'Configuration' section of my content element are shown twice.
There's also a RTE field shown at the bottom of my content element that has not been there before.
BE Output: view
Code on Pastebin: http://pastebin.com/CNcphn2k
Any help deeply appreciated.
EDIT:
I just set up a fresh instance of TYPO3 6.1.9 (blank package) and installed my extension with the above mentioned content elements. Dependencies were resolved automatically as it should (newest versions). Via the content wizard I tried to create a new element and I get the same result as in my existing install I first noticed this bug in.
EDIT2:
I was able to narrow it down to the flux:form.container tag. This duplicates the output in the BE. The select values are still switched though.
It is possible that you missed this official announcement:
http://fluidtypo3.org/blog/news/new-colpos-value.html
Failure to run the update script before letting TYPO3 change the type of the colPos value will result in the symptoms you describe. There is, unfortunately, no way to restore this (since your SQL will have cropped off all negative values and made them zero without any backup).
Restore from a backup and run the script and you should be fine.
My goal is to create a series of widgets for Orchard I can re-use on following projects.
With that in mind I'm able to create widgets for a particular theme utilising the migrations.cs file but have found this in the orchard docs:
http://docs.orchardproject.net/Documentation/widgets
Stating: "A widget is composed of two or more files that are placed in a /Packages/[MyPackage]/Widgets directory of the application." That would suit me better as in theory each widget would have it's own folder, manifest txt and be self contained with it's own resources.
My question is: Is that link out of date and therefore incorrect? And if not where would I add the 'packages' folder (I've tried adding it to various places inc the 'src' folder) but can't get it to work. Is creating a widget this way even possible?
Thanks in advance
I have been working with orchard since version 1.4 and i haven't faced with this type of code to crate a widget.i think this article is out of date check this link instead to create a widget.
in a short sentence a widget is a ContentType which has a part called WidgetPart and has Stereotype of Widget.the migration for a widget would look like this :
ContentDefinitionManager.AlterTypeDefinition("FOOWidget", cfg => cfg
.WithPart("WidgetPart")
.WithPart("CommonPart")
.WithSetting("Stereotype", "Widget"));
hope this be useful.
Want to hide the discount field from the line Items in Quote module.
How to do that?
Please help
You will need to edit the "quotes.js" file located in the quotes module and remove the generated element from the add row method.
This can be done in an upgrade safe way by creating a copy of the quotes.js file in the custom directory. You will also need to specify a custom view.edit and EditViewFooter.html and change the references in each of the files to point to the custom directory.
Here are a list of files that you need to create/modify...
custom/modules/Quotes/metadata/editviewdefs.php
custom/modules/Quotes/quotes.js
custom/modules/Quotes/tpls/EditViewFooter.tpl
custom/modules/Quotes/views/view.edit.php
I want to create a Custom Scaffolder that uses arbitrary PowerShell logic. It can render T4 templates (multiple ones if I want), with the result being output:
As a new file in your project
as a new code block inserted into an existing class
my PowerShell logic can use Visual Studio’s “code model” API to manipulate files and code elements in other arbitrary ways.
How to Customize T4 Scaffolding With PowerShell?
From http://blog.stevensanderson.com/2011/04/07/mvcscaffolding-creating-custom-scaffolders/:
In Package Manager Console of Visual Studio execute the following
command :
Scaffold CustomScaffolder ClassName
This adds a CodeTemplates folder to your project, containing files for
the new scaffolder.
As you can see, we’ve got two files:
A PowerShell script (.ps1), where we can put arbitrary logic to decide what templates get rendered and where the output goes. By
default, it renders a T4 template and uses the output to create a new
file called ExampleOutput in the root of your project.
A T4 template (.t4), i.e., the thing that the default .ps1 file renders. By default this generates a simple C#/VB class (depending on
your project type). If you want to see this working, you can run the
custom scaffolder right away:
Scaffold ClassName
This will generate a new class file, ExampleOutput.cs, in the root
folder of your project. That’s really just to show you how it works.
We don’t really want that, so don’t run the new scaffolder yet, or if
you already have done, delete ExampleOutput.cs
We're trying to implement a mobile version of our Typo3 site, but whenever I add a new Template Object and select something in "Make this a sub-template of", I get this error:
I'm not very good with typo3, so if anyone could point me in the right direction it would be great. Thanks.
Go to Install Tool > Database Analyser > COMPARE and mark the checkboxes to add missing fields and tables (you don't need to remove suggested things)
Repeat the operation as long as required, if some field can not be added by COMPARE, you need to include it manually via phpMyAdmin. Most probably in such case you'll need to resolve some conflict.
Next go to Extension Manager, find the TemplaVoila ext and search for Update button, to make sure that the config is saved correctly to the file.