Tell us what you are trying to do?
I would like a module based option for a new design of a news site.
Here is the design: hidden link
Moduls could be like:
"1 news story"-modul, "2 news stories"-modul, "1 ad"-modul, "1 hero"-modul etc.
Then the modules could make up a page and be placed in the sidebars just like a view.
But important is that news stories could step to the next story when used and not just a static parameter set on the view.
So fx. the module "1 news story" should have a counting variable when used...
Hi, preventing post duplicates across multiple Views on a site is not an easy task. It can be done, but most of what you're asking for will require advanced custom code beyond the scope of support we provide here. I can assist with any code that touches the Toolset APIs, but the majority of the code is your responsibility. If you're not a skilled PHP developer, you will probably need assistance from one. We have a portal available where you can connect with independent contractors: https://toolset.com/contractors
Here are some more details about each requirement, and how it can be accomplished: 1. Count the number of post used by the module and saved the value so that that other modules (or itself) can used it.
This is currently possible in PHP using the get_view_query_results API. This API allows you to access the results of any View query using PHP. Then you can build a list of post IDs from those results, count the number of results found, and check the result limits applied in each View. This will require some PHP experience. We have documentation for this API available here: https://toolset.com/documentation/programmer-reference/views-api/#get_view_query_results
2. Exclude posts that are used by other views on that page so that duble post is avoided.
You must add a post ID Query Filter to each View that excludes specific posts by ID, then use the get_view_query_results API (link above) to get the results of all previous views and apply those IDs to each subsequent View's post ID filter using PHP. This will require some advanced PHP knowledge. Again, I can assist with any code that touches a Toolset API, but the majority of this code is your responsibility.