How to query Umbraco's 7.X page setting (Grid Layout) to create a menu? - umbraco7

I'm using Umbraco 7.3.3 to create a home page with a verical parallax scroll menu. My approach is to create a Editor/View for each specific section and use a setting (from Grid Layout property editor) to render the ID that I'll use as anchor for my main navigation.
I've also tried to create the sections as Child Documents but it's lacks the ability to freely reorder the sections.
Is the first option the best approach to create a Grid Layout with Parallax Scroll navigation? Can someone point a different/better way to create a "scroll down" navigation menu?
The backbone is OK but I don't know how to query CurrentPage's settings under MainNavigation.cshtml Partial (I'm using Fanoe Starter Kit).
How can I query by a specific CurrentPage's setting?
I'm expecting something like:
// first try (Does NOT work)
CurrentPage.GetProperty("content").Where(s => s.some lambda expression)
//another tried option based on GetGridHtml method (Does NOT work)
CurrentPage.GetGrid("content")...
Here is the setting configuration for each row that should have a navigation item in menu:
[{
"label": "Section Name",
"description": "Type the section name",
"key": "id",
"view": "textstring",
"applyTo": "row"
}]

I've made an extra research and I found (here and here) that there is no API that handles the serialized JSON stored by the Grid Layout Editor.
Limitations With the above usage scenarios in mind, consider the grids limitations. First of all, all content entered into the grid is stored as a single property value on the content node, as a big JSON object. This means that as soon as the values are stored in the database, there is no managed api to drill into the grid content and target specific cell content - so a grid layout is not a recommended storage of reusable content - it simply wasn't designed for this scenario. If you wish to reuse content in multiple pages, it is still recommended that you store these pieces of content as separate content nodes, so they can be stored, cached and queried as usual.

Related

Oracle Apex Regional Header

Good afternoon,
I am trying to build a page using Oracle APEX 19.2. I have the application built and working fine, but now I am trying to make some changes for ease of navigation and titles.
I am trying to create a region header that would reflect the current data shown on page 4 of my table.
On the page editor, in the Region panes, I go down to the Header and Footer area and am able to create the header text using html and css, but is there a way to create the title based on a column from page 4?
I have a column on page 4 that is titled PN. Is there a way that I can take the text from Page 4_PN and make that the header for the region?
Thank you,
Kevin
is there a way to create the title based on a column from page 4?
Yes. Navigate to "Title" region's property and put (literally) &PN. in there - it'll take value from item named PN and use it as that region's title.

Marionette Layout object to render tab content

I have a region in which I need to have a tabbed view (simple) however if I want the tab content to be differently layout - not sure how to achieve it. I can create different layout with multiple region and corresponding view, but how do I attach this to tab content, given that applyout can only be attached to region? Or can this be attached to one of the div of tab-content using $el?? Need some pointers.
Not sure I entirely understand your question.. But here goes.
I have implemented a navigation component where I can pass a tabsCollection and region. It will set up a region for the content and a list of tabs above it. When a tab is clicked it will fire the callback on the model in the tabsCollection which can be used to display what ever content you want.
There are more complex ways to handle this to allow for caching of a tabs content. But basically using a Backbone collection for the tabs with their own function for displaying content will do the trick.

AngularJS: "Global" menu buttons for multiple views

I've (very) recently dived into Angular, but I'm struggling a bit with how to design my layout.
For my site I've created a menu containing an input field and some buttons. The idea is that the input field combined with either of the buttons should service a function. So say for viewA, the input field should only act as a search bar. If the user however clicks one of the buttons the input field value should be used to as a basis to create a new item in another viewB.
The search function works great for viewA, but I'm unable to make the buttons switch views. I'm suspecting (or know, but don't know how to address it) this is because the mentioned buttons are outside the view (ng-view) and thus don't have a controller.
I've searched around for "multiple controllers / views", where suggestions vary from using the include function or create a service. Problem is I have no idea what would best practise or if it's even necessary for my case.
The menu + input field is another view. It should have its own controller. Based on the route – $on($routeChangeSuccess, ...) – you can use ng-switch to switch between the appropriate HTML/template in that view. If your templates are large, you can use ng-include inside the ng-switch directives. Otherwise don't bother, and just in-line the HTML inside each ng-switch-when.
For an example of how so use $routeChangeSuccess (but not ng-switch), see https://stackoverflow.com/a/11910904/215945

How to display list of content items using Telerik Grid component

I'm begginer in the Orchard CMS.
I would like to create Content Type composed from different parts and fields which I know before. I want this content type to be enumerable ie I use content part List, I want to list it using telerik components.
For example my content type is Product and I specify its fields: Price, SKU apart from default: user(who created it) and creation time fields. Moreover the product contains also image gallery, ie image gallery content part.. I want the list of products to be shown using Telerik component Grid, including creation time and user name.
Is it better to create the whole module specifying all its fields(price,SKU) and its templates or is there any way to just take what has been already created in orchard as a content type and display it different way(using telerik)..
thanks for any advice ;)
Tomas
It appears this topic was moved and answered here:
http://orchard.codeplex.com/discussions/371276

XPages - Bind Document Data Source in a embedded Custom Control

I created a custom control that is binded to a a Domino Document data source. I embedded it in a page so that I can display it in a Dojo dialog. It has 2 properties: dialogId and docId. The document data source's Document ID property is set to compositeData.docId. In the page, I set the docId property to a viewScope variable, that will be set when an entry in a view is clicked. What I want to accomplish is that the dialog will display the document that the current view entry (that was clicked) represents. But it seems that the compositeData.docId is not set on partial or even full refresh. Is there a way to do this that the custom control will be binded to the document? I need to have this binding so that I can easily do a server-side validation when I submit the dialog. Or if there is another way, can you also put it here? Thanks a lot!
set the datasource as the document, and then edit mode, then you have a place to compute the doc id, i usually compute the doc id to a viewScope, that i set when i click the item in the repeat control
More details here.
I would prefer the DocId to be transfered via the custom control parameters rather than a Scope variable. Using the Scope breaks the custom control design principle of being self contained. You can use the yourCC.PropertyMap to actually update a value, so the hand over of the parameter will work - of course your control then needs to be refreshed so the data source is recomputed. Hope that helps.

Resources