I want to add a property for a document type in Umbraco. After that, I want to add content using the newly edited document type. Finally, I want to edit the property value of the content and save it into the database. I want to do this using a SQL command in SQL Server Management Studio, given that I have installed Umbraco and I can access the Umbraco database.
You shouldn't do these things directly in the database with Umbraco. In fact, part of your requirements (adding content) wouldn't display on the front end if you did it in the database, as doing so would not fire the events needed to add your new content to the site XML cache.
Ideally you should be doing this in code, using the API. You don't mention which version of Umbraco you're using, so I'll assume the latest (7). That being the case, you ca use the various service APIs to accomplish your requirements. You'd use the ContentType Service to create your new Document Type, and the Content Service to add the content of your new type.
For more information, refer to the Umbraco services reference page: here
As Tim says it's not a good idea to do this with SQL, an alternative solution is to do it with a package. An Umbraco package contains an XML document, it is also possible there to make an adjustment in the XML (if the goal is a generated change)
Related
I am working on multilingual site developed in asp.net MVC. Currently we are managing the translation task using resource (resx) file and everything is working fine.
Now as per client requirement, they want to integrate our resource file to a TMS "phrase" through a webhook. So in future, if they create any new key or modifying the existing resource file. Its automatically reflects in application resx file and it should automatically reflects on dev/test/prod environment.
As I tried to update the resource file on API call, its get modified and changes are reflected on application.
But when we modified the resx file under app_GlobalResources folder then it restarts the whole application. so this is one of drawback to use this approach. Also when we deploy our changes then it makes the dll of app_globalreources. Post deployment, unable to add new or make changes in existing translation.
Can any one suggest a best approach, which we should consider to fulfill above requirement.
Edit:-
Can we use json instead of resx file in existing application.
A common way to do translations is through database instead resource files. You save the same information in your database: language, key (the resource name) and value (the translated text).
With this focus, you must develop a way to do translations (the typical CRUD operations) and some layer to get any key in each language.
Talk with your client and check how important is this feature. I worked in a project like this some time ago and, at the end, we never do translations in this way. We add more functionality, made changes, translations and, when iteration finished, we move to production everything. Maybe not your case but it's a pity work on something that later hasn't use.
I want to copy exiting profile rules and add them into new profile.
It is possible using the "profman.dll" ?
Profman library allows manipulating MAPI profiles, but not rules.
You can find your client-defined rules listed as associated content (hidden) for the Inbox folder. Try using MFCMAPI for exploring Outlook internals.
Not using Profman - the rules are stored in the Inbox and can be accessed using RDOExchangeMailboxStore.Rules collection. You can copy them one at a time adjusting the relevant folder entry ids as necessary.
(I develop in Delphi XE7, edit documents locally in Office 2010 and use SharePoint through a corporate Office365 account.)
I have developed a Delphi program that modifies Word 2010 document properties and even filters and orders them by their properties. The folder where the document was stored is a network folder. The only problem is that this is slow for some colleagues in countries other than the folder location.
I thought that by moving the relevant folder to a Sharepoint server and syncing it with a local folder through OneDrive, I could overcome that issue. Also users could choose between the two interfaces, the Web Browser having access to the Sharepoint server or the Delphi program working on the local folder, changes done in one location being synched by OneDrive with the other location.
I made columns in the Sharepoint library matching the Word properties and initially Sharepoint recognized all properties and made nice lists with them.
The problem is that subsequent changes of the properties are not transferred from one place to another.
If the change is done through the Delphi program in local PC, I have overcome the issue by cheating Sharepoint: instead of simply saving a document, the Delphi program copies and pastes the contents into a new document, where the properties are saved and automatically transferred into Sharepoint columns.
But I have not found a workaround when the change of properties is done through Sharepoint…
Apparently, Sharepoint does not store the column data in the document itself, as custom properties. In fact, after downloading the document it still shows as properties the former values, not the ones showing up in Sharepoint.
Should I give up with my intention of changing properties either locally or through Sharepoint?
It turned out that the Server properties are actually stored in the Office document itself but in a different location. Physically, each type of properties is stored in different files of those that are compressed in a .docx file: custom properties come in the file "docProps/custom.xml", whereas server properties come in "customXml/item3.xml", being referred to with an "internal name" that fills the spaces between words. But anyhow, as noted in some threads here, programmatically server/SharePoint properties can be modified and retrieved through VBA with the collection ContentTypeProperties.
I had a problem with umbraco richtext editor, it was not letting me insert images, so I followed a forum and deleted the richtext editor datatype in the developer section, then i recreated the richtext editor datatype with the same settings.
My problem is: all the properties in the node which were of type RichText editor have disappeared from the content pages. i cant see the text and the editor. But i can still see the content on the website!
so i cannot edit them from the content section but i can see them on the website!
Kindly, help!
Most likely you need to add the bodyText property (or whatever you were using) to the document type(s) again. It's possible that the data was also removed, so beware republishing a node until you have the text back in there.
The reason you can still see the content on the site is because when a node is published, it's properties are cached. When the site has to access a property for the front end, it pulls it from the cache rather than getting it directly from the database. This allows the site to perform faster.
So add the rich text editor back to the document type. Copy the text from the front end back into the backend (hopefully you don't have a million pages), and always perform a backup of the site, database and all, before attempting fixes of this nature.
Have you tried access Developer/Data Types/Richtext editor and set again the options that you want?
I was browsing around and found this blog post:
http://erikej.blogspot.com/2010/04/version-3-of-exportsqlce-now-available.html
(It is for a great add in if you user SQL Server CE.)
On that post I saw an screen shot of SSMS with images in the results.
How is this done? I have images in my database (PNG files that are serialized via memory stream), but I just see numbers when I select the image column.
If you are asking how this is done, I'm not sure how it is implemented exactly. I know that you can create ssms plugins in visual studio, and I'm sure that there is a way to take a filestream object and decode it.
If you are looking for a way for you to do this besides the plugin you mentioned, there is a great freeware plugin I use. You can find a plugin ssmsboost at http://www.ssmsboost.com. This plugin has a community version and a pro version. The only difference between the two is that the community version needs to be renewed every 120 days. This plugin has a lot of nice features, but the one you're asking for is
SSMS Results Grid Visualizers:
Feature allows to export & view files or some big amounts of text or XML data from tables (like files from document storage of sharepoint services). Required data should be simply output to ResultsGrid. By right-clicking the cell with required value and selecting "Visualize As->.." you can tell to save data to file with predefined name and open it with custom or default application. No matter than SSMS truncates long data from VARBINARY/VARCHAR fields when outputing them to ResultsGrid: SSMSBoost works with internal storage of SSMS and extracts complete cell value. Below you can see how a picture from [LargePhoto] field of [Production].[ProductPhoto] table from [AdventureWorks] database is being visualized:
I'd like to recommend the MiniSQLQuery browser that is free and opensource to achieve this.
http://minisqlquery.codeplex.com/