Add subtitle to tab in tableView using appcelerator titanium - tabs

i have a table view containing multiple tabs, on this tabs i want to add picutre, title and a description lets say as a subtitle. Im new in the appcelerator environment and i have no idea how to add a subtitle, didn't find anything on google, thanks alot..heres my code
var data = [
{leftImage:'images/squiggle.png',title:'Puppy', hasChild:true,test:'/picture_events.js'},
{leftImage:'images/squiggle.png',title:'Fish', hasChild:true,test:'/picture_events.js'}
];
what is the property i can add that let me add a subtitle on the tab ??

to do this you have to create a more complex row.
See this section of the appcelerator wiki
http://wiki.appcelerator.org/display/guides/Using+TableViews#UsingTableViews-Improvingthedataandviewlayout

Related

Google Apps Scripts and Google Forms: which is the Class Form method for "Add title and description"

I'm coding a script in GAS that creates a form. I need to insert an "Add title and description" element in my form, like this one:
but I cannot identify the method in the Form class that inserts this specific element.
I need this "Add title and description" element because this is an informative piece, no answer needed from responders, so it cannot be the addParagraphTextItem() or the addTextItem(). And this is not related with new sections, so it cannot be the addSectionHeaderItem().
Edit: The problem with the addSectionHeaderItem()
The goal is to have all Titles and descriptions in only one form page, so each of them will have one multiple choice question and the user can scroll all the descriptions up and down:
Using sections creates one form page for each section and the user is obliged to navigate through the different pages. This is not the solution I am looking for:
Indeed, there is. Some methods in Form class are not named properly and mislead a little bit.
The "Add title and description" functionality is coded under the addSectionHeaderItem() method, and the "Add section" functionality is coded under the addPageBreakItem() method.
So, some code like:
var form = FormApp.create('test_form');
form.setTitle('Test Form')
.setDescription('Form description');
var section_item = form.addPageBreakItem()
section_item.setTitle('Section Title');
var title_and_description_item = form.addSectionHeaderItem();
title_and_description_item.setTitle('Some title')
.setHelpText('Some description');
gives that:
Currently, there doesn't seem to be a way to use "Add title and description" functionality programmatically. Consider creating a feature request to let Google know that you're interested in this feature.

How to configure TinyMCE to add more info about widget magento 2

How can I add more info about magento 2 widget in TinyMCE, like title, or another field? Now only widget type is visible, but I want to concatenate widget type with widget title, or if is possible on hover widget type in TinyMCE, show widget title.
I found the solution. The widgets are encoded in
lib/web/mage/adminhtml/wysiwyg/tiny_mce/plugins/magentowidget/editor_plugin.js:125
I can change from here the information that appears on the editor.

Reusable HTML Blocks in Sitecore

I'm looking for a way to create a reusable HTML widget for a website run on Sitecore 8. My original idea was to create a data template that basically consisted of a single Rich Textbox. The idea is that you could drop any number of instances of these widgets on a placeholder and it would render out the HTML from each instance of the widget on the page and in the correct placeholder.
Example:
A content item called /products/my-product is based off of "Product" data template
It consists of some fields on the Product template (maybe product name, price)
I'd like the ability for the content editor to quickly drop one or more instances of the HTML widget on the page (say, in the right rail or in a different placeholder on the sublayout. I know I could just throw a "notes" field on the product template, but I'd like to make it more dynamic so that they can add several instances of this HTML widget and place them anywhere they desire.
I quickly realized that because we need the ability for multiple instances of this widget, a data template was not enough because each instance of the widget would needs its own data to populate on the front. Thus, my idea was to allow the content editor to add HTML widgets as a child of the current item (so each item would have its own instance data). I don't think this will work because I don't know of a way to have these children tell the parent page which placeholder to put them in, so laying them out is a problem.
I also thought about somehow setting the placeholder name as a parameter or field on the data template for the HTML widget, but I couldn't figure out how to get Sitecore to dynamically add them to a placeholder when it glues everything together.
Is there a way to achieve what I'm trying to do? Seems like a reusable HTML (or other kind of widget, for that matter) would be a fairly common need. I feel like there's an easy Sitecore way to handle this that I'm missing and overcomplicating the solution.
From what I understand, you're looking for Datasource field of a component.
Basically you:
Create a data template which contains fields necessary for your component
Create a set of items using that templates
Allow authors to select one of them as the Datasource for your component.
It's built in Sitecore functionality.
Check blog post http://firebreaksice.com/using-the-datasource-field-with-sitecore-sublayouts/ or google for Sitecore datasource.
Other links:
http://www.nonlinearcreations.com/Digital/how-we-think/articles/2014/03/4-patterns-Sitecore-component-development.aspx
http://www.nonlinearcreations.com/Digital/how-we-think/articles/2015/04/Sitecore-templates.aspx
EDIT:
Read about Datasource Location field (defining the repository of datasources location) here: http://www.sitecore.net/learn/blogs/technical-blogs/getting-to-know-sitecore/posts/2011/01/handling-presentation-component-settings.aspx
Read about Datasources and MVC here: http://jockstothecore.com/sitecore-mvc-item-maze/

custom/editor tabs order in sitecore

I'm trying to find a way to change order of sitecore custom / editor tabs. by default sitecore displays custom tabs, content tab and dynamic tabs, and according to
https://www.markstiles.net/Blog/2011/02/27/editor-tabs-in-sitecore.aspx
the only way to change order of tabs is to dig into sitecore. sitecore forum isn't helpful either. any ideas if this is configurable in sitecore? above mentioned post is pretty old and sth might have changed since then, but I haven't found any info about it.
As of Sitecore 8.0 update 3, the sitecore code for retrieving the tabs is still the same with the addition of the buckets tab:
Retrieved from Sitecore.Client.dll in the Sitecore.Shell.Applications.ContentManager.Editor class
private static List<Editor.EditorTab> GetEditorTabs(Item item, Editor.Sections sections)
{
Assert.ArgumentNotNull(item, "item");
Assert.ArgumentNotNull(sections, "sections");
List<Editor.EditorTab> editorTabs = new List<Editor.EditorTab>();
Editor.GetCustomEditorTab(item, editorTabs);
Editor.GetCustomEditorTabs(item, editorTabs);
Editor.GetContentTab(item, sections, editorTabs);
if (InternalSettings.ItemBucketsEnabled)
{
Editor.GetNewSearchTab(item, sections, editorTabs);
}
Editor.GetDynamicTabs(item, editorTabs);
return editorTabs;
}
So unfortunately, it looks like this is still the order by which they get rendered. As the article mentions, this could potentially be overridden, but likely to be quite involved.
I've achieved this slightly different. Not 100% satisfied with the solution, but it works until there is a better option.
In my custom tab, that displays as the first tab and therefore the active tab when I select an item. I have added the following JavaScript code to change the active tab back to the standard Sitecore Tab.
parent.scContent.onEditorTabClick(this, null, "Content");
The code goes up to the parent window as the Tab is an iFrame and set the active tab to the "Content" tab.
My custom tab is a SPEAK tab running on Sitecore 8. Here is the SPEAK javascript PageCode for reference.
https://github.com/sobek1985/SitecoreContentEditorTabs/blob/Complete/SitecoreContentEditorTabs/SitecoreContentEditorTabs.js
And a blog post i wrote on the subject too: http://mikerobbins.co.uk/2015/07/14/sitecore-content-editor-tabs-in-speak/

Sencha Touch: One view with different content each time

I am very beginner on Sencha touch and need some help.
I have implemented a list and a view which contains one image, some text and a video. I want to use the same view but with different content with respect to which item in list is clicked. For example if the first item is clicked then show the view with image1, text1, and video1, if the second is clicked then the view with image2, text2 video2 and so on...
My thought is to create a json which contains all the content (image1, text1, video1 and image2, ...). My issue is how can I implement this? How can I retrieve the data and show different content in the same view? Is there any tutorial?
You should look at Xtemplate, it takes a template which defines how data is structured in HTML form and the data(json obj) which is rendered using templates. In you case you should create details view on list itemtap event and show it after using setData. If another item in list is tapped hide/destroy the details view and show/create details view and setData which is related to that particular list item(record). Alternatively you can use Navigation view