How to customize a SwitchableFieldDefinition - content-management-system

I have a SwitchableFieldDefinition.
I want to make different options:
one field
two fields
three fields
When I push the first option, it loads a field of the type TextFieldDefinition (for example), but I don't know if I select the second and third option because, for example, in the second option, I need to load a TextFieldDefinition and a LinkField, and in the third option I want to load three different fields.
This is the documentation, but I would like make children of my child.
I´ve been searching in demo magnolia, but I don't find something like this...
Any help?

For second and third option use CompositeField. Be sure to check what kind of transformer you configure for it to get desired resulting data structure in repository.
HTH,
Jan

Here is the solution, thanks to Jan for the support
It´s funny the way is saved in the repository because concat the option and the name:

Related

Is it possible to have different styles in one element in Jaspersoft?

Let's say I need to print the full name of a person. What I originally did was to separate the first name and last name into two elements and placed them side by side since they needed different styling (this is just an example):
Lastname, Firstname
However, I found out after that I can't actually make their width dynamic because the developers made an effort not to allow it. So now I'm wondering if I can present the name with two different styles inside one element. Is this possible? How would I accomplish that? I hope you can help, thanks!
Okay so apparently you can. All you need to do is setup the markup attribute on the text field.
Refer here for more details: http://jasperreports.sourceforge.net/sample.reference/markup/

Adding preview option in cq:dialog?

Is it possible to add a session in cq:dialog which renders whatever data is supplied in the fields and previews it out in real time. In the simplest of scenarios, I need to add two numbers and when I enter both the numbers the cq:dialog should preview it's output as 4. There should be two sessions in the the cq:dialog, like two columns, the left one to enter value to the fields and the right to display the rendered output. How to achieve this? Is it possible to?
You can make use of "event handlers". Adobe docs has a simple example using JQuery that you can customize for your requirement.
https://helpx.adobe.com/experience-manager/using/creating-touchui-events.html

Create absolute link with specific value of cell in table view

I want to render a absolute link in table from value of cell but I got a relative link instead.
Here is my configuration:
What I got when click on cell:
http://10.93.9.209:3000/http%3A%2F%2F10.131.227.253%2Fjob%2FPerformance%20Testing%20Pipeline%2Fjob%2Fstable%2F21%2F
In Grafana 7 (new table panel) it's ${__data.fields[2]} where number is column index.
This is a change introduced in one of the new Grafana versions. If you want an absolute URL, you must use ${__cell:raw} instead of ${__cell}. Reference
If you want to reference another column when clicking:
This is possible, I am using 9.1.7 and originally used the old table; however, after migrating noticed the same issue. That said, I found a way to make this work:
Add the ID column that you want to hide; example simID
If the column is the first column, say 0; then use:
var-whatever=${__data.fields[0]}
Now, override the column, field with name: simID Add option ‘Hide in Table’ and turn on
I also had to format the number, e.g. remove decimals & set unit to standard
Hope that helps someone… took me a good 2 hours to figure.
Btw, it also works on graphs and you do not have to hide; aka reference your original query in the datasource and add a data link with the same options.
What result do you get if you try $__cell_2?
The syntax above no longer works. The value is now ${__value:raw}
$__cell_2 above solution worked for me.
With the new table panel introduced in Grafana either ${__cell} or ${__cell:raw} do not work for this now.
You must use ${__value:raw}

Confluence: show {children} in table

Is there a way to display {children} in a table in a way that they all sit withing a column, one per row?
Say, I have subpages a, b and c, and want them show in a table with page name, author and something else:
|a|Denis|40|
|b|Alex|43|
|c|Unknown|2|
Did you try the reporting plugin
checkout
http://wiki.customware.net/repository/display/AtlassianPlugins/Reporting+Plugin
for instance use following config
{report-table}
{local-reporter:page:children}
{text-sort:page:title}
{local-reporter}
{report-column:title=Title}{report-info:page:title}{report-column}
{report-column:title=Author}{report-info:page:creator}{report-column}
{report-table}
Quite a bit of fun using it, once that you get going.
Francis
You could also use {metadata-report}
{metadata-report:Page,Author}
{metadata-report} is used to display metadata stored on pages using the Metadata plugin and can also be used to dislay content properties including: Page,Author,Last Changed By,Last Time Changed,Date,Time,Time Created,Posted,Space,Parent
You can also set the root page to start from and pull all of the basic page metadata out into a table. Example:
{metadata-report:Page,Author,Last Changed By,Last Time Changed,Date,Time,Time Created,Posted,Space,Parent|root=somepagewithchildren|pages=#descendants}
This can be wrapped in {table-filter} and {table-plus} macros for sorting.
{table-filter:userfilter=Page,Author,Time Created}
{table-plus:columnTypes=S,S,D"dd MMM, yyyy hh:mm"}
{metadata-report:Page,Author,Time Created}
{table-plus}
{table-filter}

Customizing single entry templates in ExpressionEngine (1.6.x)

This is either very annoying or very embarrassing. I've set up most of my blog, but I can't figure out where or how the heck I set up single entry templates as opposed to the section/weblog containing them. I just can't find information on how to do it for the life of me.
This is especially important, because I want to define the canonical link for all entries, since ExpressionEngine links to entries in all kinds of ways.
So, the case is that I have a Blog section/weblog with an index working as the front page for mydomain.com. This lists all my entries as you would imagine a regular blog to do. The problem arises when I need to customize the code for the single entries' links.
If you have a template set up already which is showing a multitude of entries and you want a single entry page for each entry then what you need to do is this :
{exp:channel:entries
channel="default_site"
sort="asc"
disable="member_data|pagination|categories"}
{title}
{/exp:channel:entries}
Then in the template shown above by template_group/template_name (please change those to whatever your template group and template names actually are ;-) ) you will place this code :
{exp:channel:entries
channel="default_site"
limit="1"
dynamic="yes"
sort="asc"
disable="member_data|pagination|categories"}
{title}
{/exp:channel:entries}
This will then show you just the one entry as you will have used the {url_title_path="template_group/template_name"} in the first channel entries tag above which would basically create a URI something like this :
http://www.example.com/template_group/template_name/url_title_of_my_posted_entry
On the second (template_group/template_name) single entry template page it will see the URL title and use this to filter down the channel entries tag to just that one entry.
Hope that helps a bit.
Best wishes,