Set menu item string when debugging UIWebView in Safari - uiwebview

I'm building an iOS app that uses multiple instances of UIWebView. When I use Safari to debug the UIWebViews the menu items in the "Develop" menu of Safari are titled "blank",
so it is difficult to distinguish them. I noticed that when Mobile Safari is the active app the menu item has the form "website host - page"
,
but when I use UIWebView my app is generating the HTML dynamically so there is no URL to base the name on. I've tested and the menu text is not set when the HTML title is set. It is also not set by setting the base URL of the UIWebView. Does anyone know if it is possible to set the menu text?

It turns out my test case was wrong and it is possible to set the menu item by setting the base URL of the UIWebView. For example:
[self.webView loadHTMLString:[self html] baseURL:[NSURL URLWithString:#"http://stackoverflow.com"]];
This works, but it isn't particularly elegant. Are there alternative ways to set the menu item?

Related

Liferay 7.3: How to make menu items in a theme controlled by admin

I have a liferay theme for version 7.3. I am facing one problem in the theme's menu.
Now menu has some static items. How can I change (add / remove) items dynamically by admin account?
The menu is added in /src/templates/portal_normal.ftl as
<#include "${full_templates_path}/menu-bar.ftl" />
this file has static html data.
Now how can I make it dynamic so that admin can change the menu items?
Make the menu as a web content, and drag it to the theme? Not makes sense because menu is the part of the theme.
Or any other way of picking the menu items, looping the items in .ftl and display it?
The times of scripting navigation and menus in the theme are over, and I'd rather recommend to embed a portlet in your theme that does the job. That might be a stock NavigationMenu portlet (see how Liferay's default "classic theme" does this with NavigationMenu or the SearchBar), or a custom one, which generates exactly what you'd like.
Reason: It's a lot simpler to redeploy a new portlet and generate/test appropriate HTML markup generation in a portlet than it is to implement proper error handling in a theme's freemarker script.
The solution can be if you want to add your data in navigation menu in themes, go into the navigation menus inside site builder in menu and create a new menu by clicking + button on top right and name the menu. Then go into the pages inside site builder inside menu. There will be a + sign on public pages. Click that and add a page that you want to list. If you want to create a submenu then on the page that is created, create a subpage by clicking there + sign. The page will be child and will be shown as a sub menu in theme.

Popup document content on a view?

I currently have a older Domino site. It has a view that I have implemented clueTip to display content of the document as I hover over the link. The popup will close when the mouse is moved off of the link.
I would like to convert the site to xPages and eliminate jQuery and clueTip and go with all native xPages or dojo components but have similar behavior with my existing site.
One thought was to use the extension library dialog box but it has the title bar and I would rather not have the title bar.
Any idea how I can display contents from a notes document in a popup on my xpage view?
P.S. While the view is an old DOmino web view, the popup is a recent additon to the view and it is actually an xpage. I feed the clueTip control the URL of the xpage document via the rel parameter in the anchor tag and the xpage is displayed in a popup. If I could leverage that same xpage url that would be ideal.
Use Tooltip xe:tooltip control from Extension Library tab to show a document in a popup.
You can find a good example in XPages Extension Library Demo in Core_Tooltip.xsp.

How to link top-level "section" navigation items when using Zurb Foundation's top bar navigation component?

I am building a site using the Zurb Foundation UI framework, and I am wondering how to go about top-level navigation links so that they work for both desktop and mobile visitors.
EDIT: Here's an example: http://meowzen.com/zurb-nav/
Section 1 <-- should take the visitor to a "section" page
--Sub-Section 1 <-- should take the visitor to a "sub-section" page
--Sub-Section 2 <-- ditto
--etc
In the example via the link above, you'll notice that all links work as expected on a large screen. However, when the responsive navigation kicks in (either by resizing the window or viewing the page on a mobile device), the "section" pages aren't accessible through the menu anymore.
Has anyone come up against this problem? Do you have any suggestions on how to go about this?
Many thanks in advance!
EDIT: Here are some options I have at the moment:
Option 1: Only show top-level 'sections' for the mobile navigation - here's an example: projection . pixar . com . <- I'm leaning towards this!
Option 2: Make the section names linkable - I believe it's possible because there's a working example here: emerilsrestaurants . com .
Option 3: Insert a dummy menu item for the section pages at the sub-section level .
In the example via the link above, you'll notice that all links work as expected on a large screen. However, when the responsive navigation kicks in (either by resizing the window or viewing the page on a mobile device), the "section" pages aren't accessible through the menu anymore.
I am not sure I am understanding you correctly, but your example is working as expected. For smaller viewports ("mobile" view) the menu is hidden in a dropdown component. Once you drop down the menu, sub-menu items are still navegable on click.

Show Title in MonoTouch tabbed application

Maybe I'm missing something super simple, but I can't seem to get a title to show up at the top of Views contained within a basic tabbed application. I follow these steps...
New Solution, Universal Storyboard, Tabbed Application
Run that and you have two basic Views "First View" and "Second View".
Neither View by default has a title bar, but the default code shows setting a this.Title.
Why don't the title bars show up? How do I get them to show? I've tried several things to get these to show such as...
Setting "Top Bar" in Interface Builder to "Navigation Bar". It then shows in Interface Builder but never shows on runtime.
I've also tried in ViewDidLoad() to set this.TabBarController.Title but that doesn't seem to do anything either.
Thoughts?
The feature you are looking for is called a NavigationBar and can be added manually via IB to your view if it does not have a NavigationController associated with it. If there is a navigation controller then the NavigationBar will show up automatically.
So to answer your question if you want a NavigationBar go to IB and add one from the objects library you should then be able to manipulate the Title on the nav bar to your hearts content.

How to add subpages in Orchard CMS

I added a new page in the main menu, e.g. Products. Now I want to add a subpage e.g. Sub Products below a Products page. I tried all possible options in the dashboard but it didn't work for me. Any ideas how to handle this?
Thanks.
here is a quick solution for this
Go to your dash board -->Gallery -->Modules
search for Hierarchical menu and install it
after installing then go to Configuration -->Features and enable it.
Go go to Navigation .give position like 2 for "Products" and 2.1 for "Sub products".
you will see Sub products appear under Products page.
As of Orchard CMS 1.5 this is supported by the core navigation module. Now you can simply drag and drop menu items under one another in the Admin -> Navigation view. You can then control level rendering under the widget settings for the menu by setting the "Start level" and "Levels to display" properties.
See release notes for further details.
The navigation documentation doesn't seem to be up to date though :(
Take a look at: http://orchard.codeplex.com/Thread/View.aspx?ThreadId=242327
The module to support this (along with many other modules) is available in Orchard's module gallery.

Resources