Load several views in one page - convertigo

I would like to print the content of several views of my couchDB database inside a page.
I have several listContainers in my page and each listContainers must print the content of one view.
To do that I added an "onDidLoad" event to my page which triggers several QueryViews (one QueryView per view).
I correctly binded the content of each ListContainer with its corresponding view.
My problem is that all the lists print the same content which is the content of the last loaded view. All the views seem to be loaded but only the last view loaded is taken into account.
Is it possible to have several QueryViews for one page and how can I load the content of different views inside one page ?

Yes, it is possible to have multiple Query view components in one Page. Use the Marker property to set a different value for each component. In the MobileComponent Source you will find all your views marked as myView#myMarker. Select corresponding view markers for your listContainers.

Related

Differentiating two views with same controller for different user in angular

I have two different views of each page in an application. One view is the editable view where a user can come and edit stuff.This view has Buttons, Text Input, Text Area etc. The other view is used to just view the data. The buttons should be hidden, Text Input, Text Area which were editable should be replaced with label.
So I have a doubt whether I should have:
(i) two different html files for each view which can be changed inside the router
(ii)same html file and use ng-if
(iii)same html file and create directive for each change
This depends on how many ng-if directives you have to create. In other words how large your view is.
If it is a small view - go for ng-if.
If not, use a separate template for the view.

how to use view ticker in drupal

Does anyone explain me how I can use Views Ticker.I loaded modul but no idea how I should use it.please explain me step by step ,I am new on drupal
thank you.I wanna do somethink like this link
enter link description here
Create a "content type" and name it anything in my own case I will name it "news"
To create a content type, navigate to administration->structure->Content type-> add content type
You can add new fields to the content type if you wish. But in my own case I will just use the default settings, since I need only the titles to appear as flash news headlines so click "save"
Next create a new view and name it anything in my own case I will call it "headlines"
To create a new view navigate to administration->structure->views->add new view,
Now setup the new view with the following attribiutes; {View Name = headlines, show = content, of type = news, sort by = Newest First, create a page = uncheck, display format = Views Ticker, of = Titles (Linked)", use a pager = unchecked, create a block = checked} now click save and exit
Next navigate to Blocks and enable the block we just created through the views. Check for the block name "headlines" and specify the location where you will like to place the newly added block and save.
To enable the block navigate to Administration->Structure->Blocks
Now Navigate to view and select the new view we just added. In my own case it is called "headlines" and make sure "Format" is set to View Ticker, you can customize the settings of the View Tick by click settings.
Next add a news content type using the content type we just created. Add a title, a summary and a content. Then hit save
To add a news content type, navigate to Add content
Tip: Add at least two news contents in other to see the full effect of the view ticker
There is "Some" documentation in the readme file. check it out and see if it fits your requirements, http://drupalcode.org/project/views_ticker.git/blob/refs/heads/7.x-2.x:/README.txt
From first glance it seems like a views plugin so you could probably try changing the dispaly in the views settings.
Yes, you need to create a new View that pulls in some kind of content (i.e. Announcements). Under the "Display Format" when creating the View, you'll see an option of "Views Ticker", if you've installed the module correctly.
Based on the example you pointed to, you'll probably want to create a Block at the same time, that you can insert into the desired region.
Once you've created the View, you'll see a link for the Display Format "Settings". This is where you choose whether to make it scroll horizontally, vertically, speed, etc.
Once you updated and saved the view, you should go Admin > Structure > Blocks and insert your newly-made Views Ticker block into one of the regions (regions available will vary based on your Theme).
Then, as long as your permissions are correct, and you have actual content,you should see the scrolling ticker show up on the page(s) where the block shows up.
To use views ticker, it needs you to have an view which outputs some data.
I assume you have such a view. Then go to that view's edit page and set format to views ticker. You should have enabled views ticker module to get that option to formats list.
Then it will show you the settings window, in which you can set settings such as vertically, horizontally, BBC, etc styles for your data movement and respective speed etc.
After you did, click on apply button and then save button top of the view's edit page.
If all goes well it should display moving contents in the page/block related to that view.

Passing Arguments from a paginated Drupal Views Page url

I have a page generated by Views which lists 5 Articles at a time. This view is paginated so that page 2 of this View will list the second batch of 5 Articles, page 3 will list the third batch of Articles, so on and so forth.
My question: is it somehow possible to extract fields from Articles listed on the page you're currently on, perhaps via the url? And I only want to them on the Articles being displayed by the page the viewer is currently on and not all the Articles.
My intent is to have a Views Block that would ...
determine what page of the paginated View above you're looking at
determine what Articles are listed on that specific page
aggregate and display the Taxonomy Terms of those listed Articles (Articles have a Taxonomy Term field) in the block
do all the above automatically as you change what page you're looking at
The way I'm going about this is to list all the the Taxonomy terms in a block which is relatively straightforward. What I can't figure out is how to filter it based on what Articles are being displayed to me in a paginated page.
I was thinking maybe this is possible to use it using the url of the paginated page which goes along this format: ?page=1, ?page=2, etc.
If anyone could just point me to the right direction, I would appreciate it. I'm also open to alternatives.
What if you created another display of the same view as your Article page view?
You could add a Relationship for the Taxonomy Terms and then the Fields in the block view would be the appropriate fields from the taxonomy terms. You'll want to setup the same Filters, Sort and Pager options for the two displays are the same. That way the results should match.
Then you might just want to hide the pager from the block view. You could do that through a custom template for that view display, or maybe a preprocess function that hides the pager for just your view, or maybe via CSS.

Drupal 7 view custom templates

I have created 1 views which include the 5 types of content types nodes.
What i want to do is customize the view template.
The first 2 stories display in other format like complete title, summary and image
and last 3 stories only title.
How this possible using views.
Or i have to use $view=views_get_view_result() method
You can create the first 2 stories as a regular View (either a page or a block, whichever you want to use) and create the remaining 3 stories as an attachment to the first view.
In the View, you should be able to create an attachment which you can then attach at the end of the first View.
This way, you can have slightly different configurations for each view but still have them in the same View page or block like:
I've posted a lengthier, illustrated step-by-step on my blog at http://nmc-codes.blogspot.ca/2012/10/views-attachment-in-drupal-7.html

Prism: Shared View For Multiple Regions

I tried using a single view for multiple Regions located in different views.
View1 -> MyRegion1 uses SharedView
View2 -> MyRegion2 uses SharedView
The initial view is View1 and it successfully shows the SharedView. When I navigate to View2, it also shows the SharedView. Now when I navigate back to View1, the SharedView is gone. Are there other steps I need to do to render a shared view in different views during navigation changes? Thanks a lot.
Not Prism but WPF wants to have a different instance of the view. So, short answer to your question is - NO, it's not possible. Please, create in any way different instances of your SharedView

Resources