How to configure multiple Material UI badges for the same content - material-ui

I have a design requirement to add multiple badges to a single piece of content. It doesn't seem to be a support use case in the docs. Has anyone implemented something like this? How should I approach this?

You can easily create a second badge the same way you would for the first badge.
Below is an example where the given content has two badges in different locations.
<materialDesign:Badged x:Name="ErrorBadge" BadgePlacementMode="TopRight">
<materialDesign:Badged x:Name="WarningBadge" BadgePlacementMode="Right">
// Content
</materialDesign:Badged>
</materialDesign:Badged>

Related

Ionic 2: create a custom picker

In my project, I've got a list of countries from a database. In Ionic 2, the select option is alert (popup). I don't need that, so my question:
How can I create a custom picker for countries list?
I just build a similar component here, base on the low-level picker component.
https://github.com/raychenfj/ion-multi-picker
Chinese City Picker
But its performance could depend on your data volume.
Fengjun Chen thanks for designing the custom Picker control.
Can you post the source for the source for the Advance usage example that you hosted on - https://raychenfj.github.io/ion-multi-picker/
Also it will help if you can post an example of how to access the events and how to style the control.

not able to register two plugins of touch-ui rte dialog

I am using the steps given in the URL to make a color-picker rte plugin
http://experience-aem.blogspot.in/2015/01/aem-6-sp1-touchui-richtext-editor-color-picker-plugin.html
and at the same time I am making another custom rte plugin to do some text modulation.
But only one of them is working using rte.coralui2 as categories.
and both icons are coming at the same location.
If I disable one js then another is working.
I have registered the plugin with different name and I have also used different variables.
I am not able to make the rte plugin button at different location.
Please suggest the possible solution.
it's possible you are overlaying rather than extending the rte.coralui2 category. I suspect your custom clientLibs are competing with each other and only one is available.
It seems like you are using the same steps provided in the blogpost for creating both the plugins and while doing that, you are using the below code twice with different icons :
if(items.indexOf(ExperienceAEM.TCP_UI_SETTING) == -1){
items.splice(3, 0, ExperienceAEM.TCP_UI_SETTING);
}
So, maybe, the icons are being added at the same place and only one of them is shown.
You should create ExperienceAEM.CuiToolbarBuilder Class only once and add both icons inside that class

Creating reusable widgets

I`m using asp.net mvc 2.0 and trying to create reusable web site parts, that can be added at any page dynamically.
The problem I have is how to load a partial view with all related js and data? Ive tried the following ways to do that:
Use partial view and put all the js into it. In main view use render partial. But to initialize partial view I need to add model to current action method model to be able to make RenderPartial("MyPartialView", Model.PartialViewModel).
Also I do not have a place to put additional data I need to fill my form(like drop down lists values, some predefined values etc).
Use RenderAction, but it seems it have same problems as RenderPartial, except for I do not need to add anything to any other model.
Any other oprions are greatly appreciated.
As I understand it, RenderAction performs the full pipeline on the action, then renders the result - so what is rendered is the same as what you'd see if you'd browsed to the action.
I've used RenderAction to render 'widgets' throughout a site, but in my view they should be independent of the page rendering them, otherwise they're not really widgets and should be part of the rendering page's code instead. For instance, if there's a log in form, you will always take the user to a page that can process the information, no matter what page they are currently on, so this makes for a good widget. Other ways I've used it is to show a shopping basket or advertising. Neither of which are dependent on the page being shown.
Hope this helps a little!

N2 CMS - Adding a piece of text to the top of every page

Am using N2 CMS and want to know how I can create an editable item that can be included in the header of every page within the site.
I just want to be able to edit this piece of text in one place and have the text appear on every page.
I understand that I need to create a "Part" but I'm not sure how to create the edit interface for this one "part"
Thanks.
Late answer but IT might help the others. You can use it as following.
#{ Html.DroppableZone(Content.Traverse.StartPage, "EDITABLEPART").Render(); }
A simpler approach (to parts) might be to:
add a property to your homepage ContentItem which is decorated with EditableTextBox or EditableFreeTextBox.
edit the homepage to set the text
then in your layout/masterpage you can simply include the output from this property
We use this technique for storing the Google Analytics tracking code against the homepage and it then gets rendered on every page.
It sounds like you need a recursive zone. Here's an example: https://github.com/jamestharpe/HereSay/blob/master/src/HereSay/Decorators/SectionalZoneDecorator.cs
Using that code, all you need to do is name your zone beginning with "Sectional" (e.g. "SectionalTopZone") and the plug-in will take care of the rest.
For an example of an editable part, you can take a look at the code here: https://github.com/jamestharpe/HereSay/blob/master/src/HereSay/Parts/HtmlContentBlock.cs

Iphone sdk - How to setup a 'template'

I've been working on a Cook Book App and I've been making each page individually which takes a really long time to do, I asked a question similar to this and it was brought to my attention that you can setup a way to automate the design process so all you need to do is input your data.
Can someone please explain in as much detail as possible how you setup your xcode files/code to automate such a process
So for example I would just enter the page text and it would automatically put my standard background picture in and add a scroll view and appropriate buttons etc.
Thanks
You could make one master view that contains all the controls that you need: standard background picture, scroll view, appropriate buttons, etc, and make any subsequent views that you create inherit from this view, so that they all contain those controls.
You could also use just one view and work with multiple instances of it, one instance per page. Just make sure to have a Text property on it, or a constructor that takes in your text string, so that you could set it to a different text on each page.
Xcode project templates and file templates are pretty easy to make, with a few caveats.
Check the answers to these questions:
Add new templates in Xcode
Change templates in XCode
Also take a gander at these handy tutorials:
Custom Xcode Templates
Xcode: How to customize the existing project templates
It sounds to me like your putting your data into your views (pages). That's a big design error. You need to employ the Model-View-Controller design pattern and separate your data from your views. That will make it easy to create one view (template) that you can reload with data to display each individual recipe.
The first thing to do is to separate your data from the view. You need to have the recipes stored in an array, dictionary, Core Data etc and then wrap that data in a dedicated object. The second thing to do is to create a dedicated view to display all the recipes. As the user moves from recipe to recipe the app will simply remove and add information to the same view as needed.
I would recommend Cocoa Recipes for Mac OS X: The Vermont Recipes, Second Edition because it addresses these issues and it uses a recipe type app as its example. It's for Cocoa but the basic principles apply to iPhone apps as well.