I have some encoding issues in Orchard CMS. When i use these characters: "ěščřžýááí" output is this: í.
This problem is not everywhere ! In admin new content type menu it is OK, but in title, when creating new content type it is wrong.
In front-end is the same problem with validation messages only.
How can I solve this? Thanks!
Localization is designed to solve this issue, use it this way:
#T("ěščřžýááí")
I do it regularly and I never had this problem.
Related
I've been experiencing a lot of headache for this issue I'm in. I need to create a multi-database search in xpage, this search functions like a mini google in xpage where if I type, for example,"test" all databases with the same name or contains a title with test will display. I've already looked with the Openntf Project http://www.openntf.org/main.nsf/project.xsp?r=project/Xpages%20Multi%20Database%20Search%20Custom%20Control this seems to solve my problem but unfortunately I'm encountering some error and I'm not a java specialist so I'm still waiting for the creator of the project to reply. So if you know something or tricks to do this kind of stuff its really appreciated. Thank you in advance.
Take a look at this:
Plugin to client's sidebar
Custom control for XPages
Ok, so I got it right by playing with the code inside the javascript in this openntf project. ( http://www.openntf.org/main.nsf/project.xsp?r=project/Xpages%20Multi%20Database%20Search%20Custom%20Control) it checks if the database is indexed or not, but unfortunately the script does not detect my indexed dbs so it throws nothing, i just comment out the line that checks it and it works! :)
I am beginner to Orchard. My purpose of starting this discussion is, to make beginners aware about Orchard Fundamentals.
I am currently Developing on web site using Orchard. But most of the times I am facing difficulty in rendering contents and how to place content on front end. As well, use of content items, content types and modules. Usually, I get confuse in using all these things. For example : I have created new content type for displaying latest post on my site, with date and user's profile picture. So for that my question is, "Is it right that I have created content type for it? or should I have to make module? and if yes than can I use my content type as a widget on my homepage? "
FYI: I went through the documentation and plural sight's video. But I was not able to clear above fundamentals.
Sorry for any inconvenience or any stupid questions, but at this time it seems bit complex for me. Can anybody please help me to clear my fundamentals of orchard?
Thank you,
Sohil Shah
I am currently Developing on web site using Orchard. But most of the times I am facing difficulty in rendering contents and how to place content on front end. As well, use of content items, content types and modules. Usually, I get confuse in using all these things. For example : I have created new content type for displaying latest post on my site, with date and user's profile picture. So for that my question is, "Is it right that I have created content type for it? or should I have to make module? and if yes than can I use my content type as a widget on my homepage? "
Is it right that I have created content type for it? or should I have to make module?
Sure, a ContentType just means that you can create instances of that specific type through the CMS.
or should I have to make module?
Do you want to re-use your contenttype across different projects? If so, then you should create code that creates the contenttype for you (in a migration script) and put that in a module.
can I use my content type as a widget on my homepage?
Yes, you need to enable your contenttype to be a widget. You can do this also with a migration script like so (add the WidgetPart and settting Widget stereotype:
ContentDefinitionManager.AlterTypeDefinition(
"MyWidget",
x => x.WithPart("WidgetPart")
.WithSetting("Stereotype", "Widget")
);
I'm working on an Orchard site where I want to document some code - a series of plugins and a set of commands that each plugin can handle.
So I'd like to have a page for each plugin, and a page for each available command, then somehow link the plugins with their supported commands.
On the plugin page, I'd like to have a list of all the commands supported by that plugin.
Conversely, on the page where each command is documented, I'd like to list all the plugins that support it. This seems to be a many-to-many relationship.
I'm happy with creating content types and I guess I'll create a 'Plugin' content type and a 'Command' content type. I expect the solution will somehow involve the use of queries. I'm not really sure how to tie it all together though.
I'm not really sure how to approach this. Has anyone got any suggestions for how to achieve this? Is there a way to do this just by configuration and defining new content types, or do you think I'll need to write code?
You can either use a content picker field configured for multiple items, or you can implement it following this doc topic: http://docs.orchardproject.net/Documentation/Creating-1-n-and-n-n-relations
One option is to us the Mechanics Module, which gives you a way to create relationships between parts either in your data migration or using the admin UI. See the Mechanics Documentation to find out more.
I've been rewriting my (fairly simple) website using Yesod as a way to get familiar with the framework. Part of that involves serving some simple static (but formatted) content. To do that I decided to use the nicHtml field that is described in the Yesod book:
http://www.yesodweb.com/book/forms
It allows simple formatting and, as the book says, "thanks to the xss-sanitize package, all user input is validated and ensured to not have XSS attacks."
However, all is not well. Some formatting seems to work when you enter it into the field, but gets wiped out somewhere between entry and submission. In particular, the form uses css embedded in 'style' attributes to do things like center text, and it is these css based formatting elements that seem to get wiped out.
I used print statements to check that it wasn't my code which was somehow messing it up. Since it doesn't seem to be, I assume that xss-sanitize doesn't like any embedded css and removes it. Modifying Yesod.Form.Nic to remove the call to sanitizeBalance appears to fix the problem, so that would seem to be the cause.
Now, I can just leave it like that, since editing these static pages requires being a trusted user anyway (i.e. me at the moment), so I don't care too much about validating out nastiness. But it feels like what it is, a hack, so my question is - is there any other way around this? Or is there another package I don't know about that provides a non-broken HTML editor field for Yesod?
Will you file a bug on the Yesod issue tracker for this? I think we are going to have to allow basic css through the editor no matter which editor we use. In your case of a trusted user, right now you could find the NicEdit field type and create a similar type that won't get filtered at all. Perhaps we should create such a field.
We're actually looking at other possible rich text editors right now for use in the Yesod website, so most likely whatever we use there will end up with a module in yesod-form. Most recently Greg pointed out Aloha editor which on first glance looks pretty cool.
Is there any way to enforce a template in Bugzilla to guide users fill in bugs descriptions ?
Actually, i'd like to put some markup texts in the bug description field and avoid the creation of custom fields.
I've installed version 3.2rc1.
Indeed, just check ../enter_bug.cgi?format=guided , which forms an example of the template feature. Half the work is already done for you.
The mechansism described under 6.2.5 Particular Templates (under the section called bug/create/create.html.tmpl and bug/create/comment.txt.tmpl) works pretty well for us. Even though you say you don't want to create custom fields, adding some arbitrary HTML is easy enough.