Ionic 2 - how to change tab name - ionic2

After you create new tabs template with Ionic 2, and you want to replace one of the tab names to something else, for example settings, is there a easy/fast way to do this without changing all instances and the files names, or creating new tab and to delete the other?

If you just want to change the text that appears as the tab link, then go to src/pages/tabs/tabs.html and in that file change the tabTitle to whatever text you would like to display.
For example <ion-tab [root]="tab1Root" tabTitle="Settings" tabIcon="list"></ion-tab>

Related

Sitecore content editor deep linking

In Sitecore 6, is there a way to deep link into the content editor? I'd like to bookmark something like
https://mysite.com/sitecore/shell/Applications/Content%20editor.aspx?item=/sitecore/Content/Data/foo
And have that bookmark go directly to that item in the content editor. Any ideas?
What you need to do is to use the fo parameter and item id instead of path, e.g.:
http://localhost/sitecore/shell/Applications/Content%20Editor.aspx?fo={4142d44b-2237-4795-b219-85e70420fced}
The ro QueryString parameter works, somewhat; for example: https://mysite.com/sitecore/shell/Applications/Content%20editor.aspx?ro=/sitecore/Content/Data/foo works, except it puts that item at the root of the content editor.
Anyone know how to show the whole tree with the specified item open?

Adding buttons for HTML elements to the Sitecore rich text editor

I would like to add a button to the Sitecore rich text editor toolbar, specifically one that inserts the H2 element.
I know the H2 element can be inserted using the paragraph styles pulldown menu, but all my editors are now using the bold button for their headings because they don't "see" the paragraph styles pulldown. So, I want to make the H2 easily available using a toolbar button. (And maybe even removing the bold buttons, since it's not semantic at all.)
But no matter how I go through the documentation, I cannot find a good explanation on how to do this.
In addition to the guide Yan posted, here's another guide.
I found a couple of walkthroughs for this...
Sitecore v6.3 and previous: link
Sitecore v6.4: link
Make sure that you select the core database (bottom right of Sitecore desktop) so that you can see the /sitecore/system/Settings/Html Editor Profiles area.
In my article here the first step of wiring up an event to a button is in javascript. From there you can insert text or tags. You can also get the selected text and wrap it in tags. You don't need to compile anything I was just showing how you would if you needed to, but you can entirely cut that piece out and just use the editor to send whatever text you want back to the wysiwyg editor.

Qt Tabs for Files

Well, i'm working on an IDE System, which can open multiple files at same time. I'm somewhat noob with Tabs.
What i'm trying to do is a TabSystem, you click a file on the File Tree and it opens a new tab for it and show it's content. You can switch to other tag then switch to that one, drag tabs, etc.
Any idea?
To display your project tree you could use QTreeWidget. For file content you could use QTextEdit(for starter). Use QTabWidget to show multiple QTextEdits in different tabs.

How do you post content to a specific template position?

I purchased a template / theme from RocketTheme, but I can't figure out how to add content at a specific position.
The templates have "module positions" that collapse. I'd like to add some content at one of the module positions.
If I add articles, they seem to go into "mainbody". But I'd like to have content in other areas of the template.
How do I take some text, images, or other content, and get them to display in these other positions (i.e., TOP-A, or FEATURE-A, etc)?
I've tried this
Go to Extensions->Module Manager
Select "New", Select "Sections"
Under "Details", I select Position->Top-A
I give it a title.
Nothing seems to happen. I don't see anything new exposed in the admin UI, and I don't see a way to get any content into this newly defined section. What am I not understanding?
go to JED and look up html in module or content in module or content in component there are a bunch of them. http://extensions.joomla.org/search?q=module+content&start=20
Essentially
you create and save an article. Make sure it is saved to a section or category on your menu
open the module one of the paramaters will ask for the article id...decide which position and which pages you want it on and then publish.
You can also get modules that will take some or all of your articles in a category and then show them either as a slidedhow or one randomly when someone visits the page

Hide a tab previously added to Qt TabWidget

I've a dialog which contains a Qt TabWidget with a number of tabs added.
I'd like to hide one of the tabs.
_mytab->hide()
doesn't work. I don't want to just delete the tab and all its widgets from the .ui file because other code relies on the widgets within the tab. However, it would be fine to generate the tab code but somehow not ::insertTab in the generated uic_mydialog.cpp. Setting the hidden property in the ui file does not work either.
I'm using Qt 3.3
I had encountered the same problem. I am using the following approach.
Now here is the data.
genTab is the name of my QTabWidget
tabX is the name of the tab that i want to remove.
(Note that this is the second tab in the Tab Widget. Hence, i will be using "1" as the index to refer to this tab)
The code to remove and add is as below.
ui.genTab->removeTab(1); // removes the tab at the index 1 which is the second tab from left
ui.genTab->insertTab(1, ui.tabX, "<Name of TabX>"); // The tab is added back.
Here, note that it is easy to do this if you have the tab added statically in the design time. Because we will have an object name associated with the tab and hence we can refer to it using, ui.tabX. From what you say, in your case the tab is indeed added statically in the design time.
However, if you are adding the tabs dynamically, then probably you will have to maintain the tabs in a list and then have another list for deletedTabs.
But the first solution will most likely work for you.
Hope this helps.
-Arjun
I would use QTabDialog::removePage(QWidget* pTabPage) which does not delete pTabPage, which is what you want.
_myTabDlg->removePage(_mytab);
I'm using it and it works fine !