ArgsTable storybook 6 MDX - storybook

I am trying to insert ArgsTable inside an MDX file but it does not show the table.
The components are developed with Litelement.
Have you also encountered the same problem?
<ArgsTable story="name-story" />

I think if you want to use the ArgdTable in MDX, you need to do this:
<Story name="Foo Bar"> ... </Story>
<ArgsTable story="Foo Bar" />
What is the name on your Story?

Related

How to deal with "The ID '...' is already used by another control when conditionally removing controls?

I have a custom control that currently conditionally renders content:
<me:CustomControl>
<switch>
<if "expression is true">
<textbox id="Name" />
</if>
<if "expression is true">
...
</if>
<else>
<textbox id="Name" />
</else>
</switch>
</me:CustomControl>
My example above makes no logical sense, but gets straight to the point. The <if> tag is evaluated by overriding the GetChildControlType function. The <textbox> inside is evaluated in the <if>'s control builder.
What I want to do is completely remove the control from the collection, or even better yet, prevent child controls of <if> from being added to the collection to begin with. If I try to remove them OnInit, I still get the error "The ID 'Name' is already used by another control."
I can't evaluate them in the:
Public Overrides Function GetChildControlType(ByVal tagName... ) As Type
Because I need to perform logic on all the if's and else's within it.
Maybe there's a better way?
Update
I get a compilation error even if I break this thing down to bare bones if there are more than one controls with the same ID, even though overriding CreateChildControls. not sure if I can get around this at all.

umbraco value doesn't show

I'm working in local and I have my database in local.
But when I want to take an umbraco value it doesn't show anything.
Like this
<ul>
<umbraco:Item fieeld="contact" runat="server" />
</ul>
I have no idea why, someone who can me explain why?
If it's inside a template, the right way is this:
<umbraco:item field="propertyAlias" runat="server" />
But if it's inside a macro you must use:
Model.GetProperty("propertyAlias").Value

Enabling table plugin feature on CQ5

I am working with a task right now which I need to display the existing features of a "table" plugin. However, I am having a hard time enabling it. When using this code below, I only get to have the table properties feature. That's the only displayed tool/icon I have on my richtext editor. Can somebody help me enable/display other features/icons such as (insertcolumn, insertrow, etc)?
<tableField jcr:primaryType="cq:Widget" xtype="richtext">
<rtePlugins jcr:primaryType="nt:unstructured">
<table jcr:primaryType="nt:unstructured" features="*" />
</rtePlugins>
</tableField>
I have tried doing this (below) but I still failed.
<tableField jcr:primaryType="cq:Widget" xtype="richtext">
<rtePlugins jcr:primaryType="nt:unstructured">
<table jcr:primaryType="nt:unstructured" features="[insertcolumn,insertrow]" />
</rtePlugins>
</tableField>
http://dev.day.com/docs/en/cq/current/administering/configuring_rich_text_editor.html
That's the only toolbar button that the table plugin provides. To use the other features, right-click on the table itself:

Extending the current publishing/unpublishing screen

I have a requirement where I need to show a an alert/popup when an editor clicks on the Unpublish menu command. I will show the popup with an Yes/No Button, if Yes is selected we proceed and show the existing UnPub screen. If No is selected No activity happens and the user return back to the screen.
How this can be achieved ?
Can we extend/override the existing CME command's without creating a new Command for ourselves?
I just learned how to do this yesterday (Thank to Nuno Linhares) - you need to be familiar with making a new Editor for the GUI first.
Next step is to find the name of the command that you want to overwrite (Probably "UnPublish" in your case). The easiest way to do that is to use "inspect element" with Chrome or FieFox in the GUI, and look for something like c:command="UnPublish" on the button you wish to extend.
Once you have a basic editor set up, you need to add your new command to overwrite your existing one something like this:
<extensions>
<ext:dataextenders />
<ext:editorextensions>
<ext:editorextension target="CME">
<ext:editurls />
<ext:listdefinitions />
<ext:taskbars />
<ext:commands />
<ext:commandextensions>
<ext:commands>
<ext:command name="UnPublish" extendingcommand="CustomUnPublishCommand"/>
</ext:commands>
<ext:dependencies>
<cfg:dependency>CustomUnPublish.CommandSet</cfg:dependency>
</ext:dependencies>
</ext:commandextensions>
<ext:contextmenus />
<ext:lists />
<ext:tabpages />
<ext:toolbars />
<ext:ribbontoolbars />
</ext:editorextension>
</ext:editorextensions>
</extensions>
Add all your dependencies (JS and CSS etc) and command references in the normal way.
Then write your JS execute function as you would any other GUI command, and call the existing command after you have worked on your popup, something like this:
CustomUnPublish.prototype._execute = function CustomUnPublish$_execute(selection, pipeline) {
//Insert some logic to make a popup and confirm
blnOkToProceed = true;
//
if (blnOkToProceed) {
//EDIT: Original code
$cme.getCommand("UnPublish")._execute(selection, pipeline);
//EDIT: Or using the suggestion from #Peter below
$commands.executeCommand("UnPublish", selection, pipeline);
//End Edit
}
return;
};

Binding unique URLs to XML site map ASP.NET

So, I'm new to ASP.NET and website development in general. I've run into a problem using data binding to an XML file to build a site map for an ASP.NET application. Here's the first portion of the sitemap:
<Privo>
<child display="Current Projects">
<child display="Amifostin">
<child display="Experiments">
<leaf>HTT</leaf>
<leaf>MTT</leaf>
<leaf>HPLC</leaf>
<leaf>UV-Spec</leaf>
</child>
And the data binding from the site.master file:
<DataBindings>
<asp:TreeNodeBinding DataMember="child" TextField="display" />
<asp:TreeNodeBinding DataMember="leaf" TextField="#InnerText" />
</DataBindings>
What'd I'd like to do it something like this:
<leaf url="ExperimentsView.aspx/HTT">HTT<leaf>
and
<asp:TreeNodeBinding DataMember="leaf" TextField="#InnnerText" NavigateUrl="url"/>
BUT, here's the problem: when I try to bind the NavigateUrl, the only thing I can do is bind a type of node to a url - meaning, every leaf will link the the same url. Is there a way to bind a field of the leaf nodes to a (unique) url, or will I have to make different DataMembers for each unique url?
Note: yes, I know about Web.sitemap. That's what I was using when the project lead told me that he wants to use XML data binding.
You will need to use the NavigateUrlField property to do this (see http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.treenodebinding.navigateurlfield.aspx)

Resources