thanks for your help
I have 3 different tables, which I would like to display in one list with pagination,
the 3 tables have different attributes
table_1{id, title, description, ...}
table_2{id, title, company, phone, ...}
table_2{id, name, country, ...}
is it possible ?
Display 3 different tables in only one list have no sense, maybe you want to display 3 list in only one page. In that case you can do it with Multiple list definitions.
I suggest you to download and install the Test Plugin and take a look to the Tree menu. Also take a look on the Trees controller and how it implement the Multiple list definitions and display 3 list in the index page.
The lists look like this
Related
I'm having multiple different data sources and on a website. I'm displaying items in the descending date order (showing the latest first). All data sources can be described as a separate category. Let's say I have sources for Cars, Boats, Motorbikes. The problem is that when new Cars being added to my index, my homepage will be filled with Cars only. However, I still want the users to see Cars, Boats, Motorbikes as well.
Is there query that can return a mix of multiple categories without specifying any category? I have thousands of categories, I cannot add multiple conditions for each. It is like saying: I want the latest contents that are mostly distinct in categories (each item can have tens of categories as well).
My collections in strapi
Orders
Items
My goal
Collection Items
beer
water
sprite
example of a order
3 beer
2 water
2 sprite
My situation
My solution was to use many to many relations between collections orders and items.
So when i create a order like the example from above, i got the following result:
order
1 beer
1 water
1 sprite
It seems that strapi can't handle repeatable (same id) items in a collection. Am i doing something wrong or is there just no way to make this kind of relations between collections.
In your case, I suggest you use a component (repeatable) to do that.
In the Content Type Builder create a new component.
With a number field and a relation field with your products.
In your Order Content Type you add a component field, select the repeatable option and use the component you just created.
With that, in your Orders, you will be able to add a new item, specify which item and the numbers of items (with the interfere field)
I am going to make a voting website. To get the information from a user , I divide the form into three parts – election, candidate, voter, and place the three forms on three different pages. I want to update my database table after completion of three forms. Normally I use Input façade to get form data. But here I use three different forms on three different pages. I try to use Input::all() like-
$data=Input::all();
But I need to get property of the object also like
Input->election_name, Input->start_time etc.
So, I want to save three different Input façades in three different places. And when I need I can use them like-
Input1->election_name;
Input2->candidate_name;
Input3->voter_ name;
How to solve the problem?
Hello everybody I'm making a "Bulletin board", like this: http://stena.kg/ad/post, I'm using Laravel 5.0, and don't know how to store different fields in database table, for example if I choose "Cars" category I should to fill Mark, Model, Fuel (etc fields for cars category), If I choose Flats category I should fill fields like Area, Number of rooms etc...How to organize all of this? I tried some ideas but nothing helped me(
Try to save data as json in table. Parse json format to string and save it in db, but it will cause many problems in future, so not recommend that solution. I recommend to store data in separate tabels, each one for category. For optimise process it is possible to create catregory table, and category_item table with fields like name, description and so on. Different category demands sp=ecific fields, so best solution is to create table per category.
In my project we define threats/risks and countermeasures. I want to keep track and refer to both types of entities in Sphinx, as well as generating a list of both threats/risks and the countermeasures. Let's say I have 30 risks and 50 countermeasures (many-to-many relationship).
I'd be happy just to have a lists of both and the ability to refer to each other by numbers (e.g. "risk #23", "countermeasure #12"). It would be even better if the system could display the relationship automatically.
The content of both is let's say a single paragraph or even shorter, so that's why I dislike to use regular headings. And I cannot refer to items in lists or table rows. So, I'm looking for something like a Figure in Sphinx (numbered, with caption), but then for arbitrary types of entities.
My current approach is to create a custom RST role for this. Is this the right approach? If so, where to start?