Options for single page view / Book view in com.apple.ibooks.display-options.xml - epub

Is there any option to change the apperance to pageview/Book view in com.apple.ibooks.display-options.xml file for epub

No. At the moment you can only do page view for fixed layout books and book view is the only option for reflowable...
More on fixed layout ePubs here: http://wiki.mobileread.com/wiki/Fixed_layout_ePub.

Related

Difference between template, layout and view in rails

I am going through the rails guides: https://guides.rubyonrails.org/layouts_and_rendering.html
Can someone say what's the difference between a view, a layout and a template in a rails application? With examples and code snippets if necessary. Thank you ahead of time!
What is a layout?
All pages of a website, usually have the same header and footer. For example, all pages on StackOverflow have the logo and search bar on top. And the same footer in the bottom.
So, instead of defining it for every page that makes up your application, you define it once in a layout. And you use that layout for all your pages.
Note: You do have the ability to have more than 1 layout.
What Is A View?
Another word for "View" is screen. It's one screen of your application. For example, on StackOverflow, there is an "answer view" or "answer screen". The details of the answer might change. Those details are pulled from the DB based on the URL. But, the whole output that fills up the screen is a View.
There might be other screens/views like "Login", "Help", "Posting A Question" etc.
What is a template?
This is any piece of HTML that you might want to use over and over. For example, all "comments" have the same HTML code. But, the data in them might differ. So, all comments share the same "template".
I hope this is clear.

MVC - Have View affect sections of main layout

I've created a layout with all the styling etc. I have a menu and sub menu here, also a 3 column layout for content.
The left column will be used as a filter for reports most of the time, center for main content and the right column for help tips depending on the view you're at.
Can I define what the links in the sub menu are?
What is populated in the Left and Right columns, depending on the current view?
If you're looking to add new content in those areas, you want to be looking at sections.
You can see an example of this in the default project, just do a file-new-project to check out the layout page. You'll want something like this in your layout:
#RenderSection("SideBar", false)
The false here lets you opt-out of putting sidebar content on a view.
Your view would then have something like this:
#section SideBar {
// your sidebar stuff
}
As always, the Gu knows best: http://weblogs.asp.net/scottgu/archive/2010/12/30/asp-net-mvc-3-layouts-and-sections-with-razor.aspx
Cheers.

The following sections have been defined but have not been rendered for the layout page "~/Views/Shared/_Layout.cshtml"

I know there are a few questions that have been answered but I didn't find something specific to my case.
I'm using the mobile capabilities of MVC4. So I created a _layout.mobile.cshtml and the corresponding views.
The error above happens when I go in with a mobile device. As you can see, it is trying to display the regular _layout.cshtml instead of the _layout.mobile.cshtml. So I'm assuming it is also trying to display the view (say Index.mobile.cshtm) which doesn't have the section in question. Basically it is mixing the regular layout with the mobile views.
This doesn't happen all the time. If I recycle the pool it works again for a while and then all of the sudden it goes back to having the error and it will continue until I recycle the pool again.
Has anyone seen this problem before that can shed some light?
Thanks
John
In the _ViewStart.cshtml available under the Views folder, change the Layout value to your custom layout. I think this may help.. (Make sure that you are returning View instead of partial view)
for example
#{
Layout = "~/Views/Shared/_layout.mobile.cshtml";
}
In case if you want to change the layout for a specific page you can explicitly define it at the top of the page as a page directive.
in the index.cshtml there is a section being called defined in the original layout file "_LayoutHome.cshtml" that is not defined in the new bootstrap layout.
specifically: #RenderSection("featured", required: false)
So the solution is to either add this section to the new layout (look for it in the original layout and paste it) or simply delete it from the index.cshtml.
I had also face the same problem I removed
#section featured {
From View
Another way to do this is to use a conditional block in your _ViewStart.cshtml page. For example, you may have two layouts depending on the device regular user. Using pseudo-code for the reading of the device/browser type bit, it would look something like this:
#{
if(userIsMobile)
{
Layout = "~/Views/Shared/_MobileLayout.cshtml";
}
else
{
Layout = "~/Views/Shared/_Layout.cshtml";
}
}
I have used this to display or hide sections or menu items as needed for different classes of user; it should work as well for device-specific layouts.
Joey Morgan

How does a view know which layout to use? Where is the default?

In default mvc app. There are Layout and content pages, You know (_Layout, Home, Contact, etc.)
And content pages do not contain layout refrence as this:
Layout = "~/Views/Shared/_Layout.cshtml";
In content pages this code is missing.
But they works. How does it do this without layout refrence?
Because your _ViewStart.cshtml contains a reference to the default layout that will be used when a specific one is not stated on the view.
When you want to change the layout for a single view, you would include a Layout = "..."; to that view.
If you want folder specific layouts i.e. (Home, Account, Product etc), you can put _ViewStart.cshtml in that folder & point out whichever layout tobe used in that file & it will override the root level layout.
Find ScottGu's blogs for more details on layouts & sections here & here

Unable to edit content using admin part

I have to support a website developed in umbraco. I am totally new to this and this is am working on this for the very first time. My requirement is very straight-I need to edit the content of a webpage. When I too the page it opened with two tabs - Main Content and Properties. In the main content tab I can edit the Title, Banner image, Content header etc, but not the content of the page. It doesn't give any rich textbox to edit the content. I have uploaded the view of one of the page.
I need urgently need to edit the content.Please help with this.
The screenshot implies that the content should be under the "Content" headline in the right screen, but depending on how the documenttype for the frontpage i created, the content could be made up by sub nodes. try folding out the tree to see.
If it dos-nt make sence you can see what documentype a node is made on and what template it uses to display it by clicking the Properties tab. Then go to the Settings Tab in the bottom and see what that documenttype contains and how its displayed in the template

Resources