How to use conditional view in fuelphp? - fuelphp

I've a website built on fuelphp framework. I want to make a new version of this website with new design. I want to keep the both design.
I've thought the following two ways-
Put a button on my website as Old UI / New UI or
Use http://example.com/beta
As my changes would be only on views I don't want to duplicate all the controllers. I just want to load the views dynamically with a condition.
How can I do that?

Themes would be perfect for this. It allows you to have different grouped sets of views that you can switch between by changing the active theme.
Documentation: http://fuelphp.com/docs/classes/theme/introduction.html

Related

How to include list view BackPack with other components or widgets?

I would like yo add something to the list view in order to make a report.
Is it possible without override the view and had some components or widgets below ?
How can I include the list view several times on a page ?
Thanks for your help
You can easily add stuff to the List page using Backpack Widgets. They basically allow you to include a view within an existing page. You can of course include a custom view (aka custom widget) instead of an existing one.
You CANNOT however include the list view more than one time per page. It's not coded in a way that allows that.

Dynamically add tabs in Tablayoutpanle using UIBinder

To be clear i'm a newbie to GWT.I was looking around for samples to implement dynamic tabs, and found this link, http://www.java2s.com/Code/Java/GWT/AddingnewtabdynamicallyExtGWT.htm , in which they make use of GXT.But my question is,how can i implement dynamic views using UIBinder?.I want to implement something similar to browser tabs.Each newly created tab has a split panel view, whose content will be populated making a rpc request.My question is , how is the history mechanism handled when user switches between tabs?.Can anyone provide with samples?Thanks
You declare your TabLayoutPanel together with the initial/default tabs in UiBinder. Then you can add or remove tabs from this panel in your Java code.

How can you add iOS buttons and features to a Table View based app?

So basically I have made a storyboard based app which consists of table views and text. It is designed to help new programmers like a handbook. You have a table view which allows you to choose a language, a table view which allows you to choose a section (eg initialisation) a table view to choose a subject (e.g. integer) then a text view of how to go about this.
When it was reviewed, they said
Did not include iOS features. For example, your app was just largely
text table views. It would be appropriate to use native iOS buttons
and iOS features other than just web views, Push Notifications, or
sharing.
I feel like adding these things would degrade from the simplicity and educational purpose of the app. Also, I feel it might be more difficult to navigate if its all iOS button based. Also it might be more difficult to add things later.
So how would you go about adding these things to a table based app so that it can pass the review? I just don't know what they want me to add/change. I have just added a title page with a background image and iOS buttons that direct to the main section a small section and the contact us page. What else can I do?
how would you go about adding these things to a table based app
I'd start by trying to forget about what I'd already done (since that was rejected) and ask myself: how can I design this using the tools available so that the user can quickly get to the information they need?
UIPickerView comes to mind. Instead of going through three screens just to say what you want, a picker with three sections would let you select all three parameters at once.
It'd be nice if you could provide access to the information in the app several ways. What if I want to browse through all the topics? Do I have to choose one section at a to,e, or can I just start reading? A search feature would be nice, so I can find stuff even when I don't know what section it's in. A tab bar and search field would be useful for these.
Perhaps the most important thing is that however it's designed, your app should look polished. It should look like you spent time making it useful and beautiful. Give it some personality.

Making an iPhone Application Configurable

For my application I have multiple customers. For each customer there is a different set of images and server URLs. To address this issue I have created customer-specific files. So according to the target selected, the specific file is used for getting the images and dynamically loading them in the UI. But this method works only in case of similar layout for each customer. So precisely saying, the method I am using currently is not scaleable.
Following are the issues which I am facing right now:
The real problem comes when I need to change the layout according to the customer. In case of few screens I can dynamically set the position of elements in UI but its not a feasible solution in case of several XIB files. What is the best industry standard to achieve this?
Addition/deletion/modification of a feature is an issue. Suppose I have a Tab bar in my application. To provide 6 features to a customer, I have 6 different TabBar items in the app. Suppose if one the customer doesn't want any one of the feature from those. Is using a simple if-else to suppress any specific tab a right way to achieve this?
My approach is to not use XIB files and create all objects programmatically.
I have plist configuration files which define the objects in the app going so far as to define:
1) if the app starts with a tabbar or not, (if so how many items, their names and what viewcontrollers they refer to),
2) the viewcontrollers and tableviewcontrollers,
3) any buttons or images or text fields within the view of each viewcontroller etc.
then each version of the app can have different plist files and associated resources.

TableView or ScrollView for edit form?

I wonder which will be the best route for build edit forms on the iPhone, using a TableView or using a scrollview.
I need:
Support up to 15 fields (similar to contact app)
The same behavior of safari forms, where is possible go back/forward among fields, and the form center the selected field and stay there when the user end the editing
Simple layout (one field after other)
I'm looking for the most-user friendly experience. Which route has been proved to be the better?
Exist good examples of great edit forms on iPhone apps?
I would vote for a tableview organized by sections. If nothing else, it is a more common layout and most users will be familiar with it.
In either case, you will have to handle the transition from field to field with custom code.