• Resolved wildlife77

    (@wildlife77)


    We have a unique situation where we’re trying to achieve something that may be impossible. But your plugin with the Toolset add-on is the closest I’ve found so far to enabling us to do what’s needed.

    What we want to do is to have our Toolset Views on one site generate the content that will appear as pages on a second site. We do not want to share the actual Views setup/code with the second site. We just want the second site to be able to utilize the Views we’ve built on the first site.

    Is there any way to achieve this? We’ve asked Toolset support about this and they said the following in response to my question about using a multisite network to achieve this goal:

    —————————————————–

    A Multisite set-up is a little different, in that there is a single database shared by sub-sites, but each sub-site has it’s own database tables (e.g. their own version of wp_posts).

    WordPress does provide a means to switch context between sites that you could in theory use before making a query.

    You can use switch_to_blog() to change context before running a query, and restore_current_blog to revert context afterwards.

    But, Toolset doesn’t include any handling for such a scenario.

    I’m not sure whether it is feasible to get a View on one site to run on another site (rather than have a View which runs on a site query data from another site).

    If there is a solution it will involve those WordPress functions, but I can’t say much more than that, I’m afraid.

    ————————————————–

    Note that we can create pages on the first site that display views to create the content we’d like to appear on the second site. As such, we don’t necessarily need the Views themselves to execute on the second site. As long as the pages that get created using Views on the first site get fed to the second site intact, that would be sufficient to meet our needs.

    Thanks for any advice or assistance you can offer. We’re fine with purchasing your add-ons package that includes the Toolset add-on if it can achieve our goal here.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author edward_plainview

    (@edward_plainview)

    When assigning a View to a page, only a custom field is set for the page, referring to the ID of a View.

    Page are generated using the View at display-time, not save-time.

    Generally, switching sites in the middle of a page query is far more effort than it’s worth. In fact, after days of fighting the WP_Query object the result isn’t 100% anyays.

    What is your use case?

    Would it not be easier to have the Views broadcasted normally, and then just prevent the user from accessing the Views?

    Thread Starter wildlife77

    (@wildlife77)

    The use case is we have a very elaborate system of Views that we’ve set up where we want to make the output from them available to the other site, but we don’t want the other site owners to be able to log in as admins on their site and be able to copy and paste the view code itself.

    If there is a way to make the Views inaccessible to admins, that would work too. But the site owners do need admin access to their own site. We’re considering drawing up a legal contract saying the Views code remains our’s and they have no claim or right to use of it outside of what we’re allowing on their website, and that they agree to non-disclosure terms. But it would be much easier/better if we could provide the output without allowing them access to our Views code in some way.

    Plugin Author edward_plainview

    (@edward_plainview)

    The best solution would be to hide the Views menu from the admin completely. I’m not familiar with the Toolset code, but the Toolset people should be able to provide you with either a setting, filter or code to hide the menu from view.

    Hear with them?

    Thread Starter wildlife77

    (@wildlife77)

    I found a plugin combination that achieved this. User Role Editor combined with Adminimize. Thanks.

    Plugin Author edward_plainview

    (@edward_plainview)

    Cool. Marking as resolved, I guess.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Question about Toolset add-on’ is closed to new replies.