Advanced Views Docs
Live PlaygroundDownload PluginGet PRO
  • 💡Help Centre
  • ⚡Getting Started
    • Introduction
      • Key Aspects
      • Creating Your First View
      • Creating Your First Card
      • Plugin Terms
      • Plugin Interface
        • Field Options
    • Installation
      • Advanced Views Lite
      • Advanced Views Pro
      • Comparison Table
      • Upgrading from Lite to Pro
    • Supported data vendors
    • Starter theme
  • 🌟Display Content
    • WordPress
      • Post
      • Taxonomy terms
      • User
      • Comments
      • Menus
    • WooCommerce Product
    • Meta fields
      • Basic fields
        • Number
      • Content fields
        • Image
        • File
        • WYSIWYG
        • oEmbed
        • Gallery
      • Choice fields
        • Select/checkbox/radio
        • True / False
      • Relationship fields
        • Link
        • Post_object
        • Page Link
        • Relationship
        • Taxonomy
        • User
      • Advanced fields
        • Google Map
        • Google Map Multiple Markers
        • ACF OpenStreetMap Field
        • Date/time picker
      • Layout fields
        • Group (Pro)
        • Repeater (Pro)
        • Flexible (Pro)
    • Object fields
    • Custom Data (Pro)
    • Custom Gutenberg Blocks (Pro)
    • Mount Points (Pro)
    • Front-end assets management (Pro)
  • 🦸‍♂️Query Content
    • Basic Filters
    • Meta Filters (Pro)
      • Current Post
      • Comparison
      • Dynamic Injection
    • Taxonomy Filters (Pro)
    • Pagination (Pro)
    • Custom Data (Pro)
  • 🏆Shortcode Attributes
    • Common Arguments
    • View Shortcode
    • Card Shortcode
  • 🧙‍♂️Templates
    • Customizing the Template
    • Template engines
      • Twig
      • Blade
    • CSS & JS
      • BEM Methodology
      • WordPress Interactivity API
    • File system storage
    • Pre-built components
    • Reusable components library (Pro)
    • Live reload
    • Multilingual
    • Custom Ajax & Rest API (Pro)
  • ☕Guides
    • Display Custom Post Type (CPT) on another post
    • Display Employees (CPT) of a Company (CPT)
    • Display Nested Repeater Fields
    • Map Marker from ACF Image
    • Display all CPT items on a single map
  • 🛠️Tools
    • Export/Import
    • Demo Import
    • Settings
    • Preview
  • 🏹Troubleshooting
    • Compatibility
    • Report a bug
    • Payment Issues
    • Lite Support (Forum)
    • Pro Support
  • ⚙️Customization
    • Filters and Hooks
      • View
      • Card
    • Suggest a feature
    • Performance
Powered by GitBook
On this page
  • About the feature
  • How it works
  • How to create a Git library
  • How to add (push) items
  • How to import (pull) items

Was this helpful?

  1. Templates

Reusable components library (Pro)

PreviousPre-built componentsNextLive reload

Last updated 1 year ago

Was this helpful?

About the feature

Reusing is a fundamental aspect that enables developers to create advanced functionalities without investing excessive time in implementation.

In the Pro version, you can reuse Views and Cards that you've crafted for one website and use them on multiple other websites. You have the capability to preserve any item in your personal Git library, expediting the development process for future websites.

How it works

Reusing necessitates an independent storage space (library) distinct from any specific project, along with a manager capable of pulling and pushing items to this library.

Within Advanced Views, any GitLab repository can function as a component library, and the Advanced Views UI facilitates pulling and pushing Views and Cards into this library.

Additionally, you have the option to include related Meta groups with the component, prompting Advanced Views to automatically create all associated Meta groups during the pull process.

We've opted for Git due to its robustness and widespread use as a version control tool, with repositories being entirely free.

You can interact with the library solely through the plugin's UI or alternatively, make modifications using the git terminal and GitLab UI.

The libraries you construct are entirely yours, ensuring you maintain full control over them even after your Pro plugin license has expired.

Note: The Git library is project-independent, allowing you to continue using Git for managing specific projects, as Advanced Views refrains from creating any '.git' folder and utilizes Rest API for pulling and pushing items to the library.

How to create a Git library

  1. Create a GitLab account (free).

  2. Establish a new private repository (free).

  3. Navigate to the 'Git repositories' tab in the plugin settings and follow the provided instructions to add the new repository.

How to add (push) items

Once you've added a Git repository in the settings, you can 'push' any View or Card to the repository. Simply open the desired View or Card, select the added repository from the 'GitLab repositories' meta box (located in the right panel), and click the 'Push' button.

If you select the 'Include related Meta groups' checkbox, the component will also store data related to associated Meta Groups (such as ACF Group) and automatically import them during 'pulling'.

Note: When you 'push' a View or Card, all related Views will be included automatically. Therefore, pushing a Card will also push the corresponding View.

How to import (pull) items

Once you've added a Git repository in the settings, you can 'pull' any View or Card from the repository to the current website.

In the items list table header (Views or Cards), you'll notice a new tab named after your repository. Click on it to view the list of available items. You can then 'import' individual items or perform bulk imports.

Please be aware that importing may take some time, especially if components include Meta Groups data. Therefore, we recommend importing no more than 5 items at a time.

Overriding existing items

If you import items that already exist on the website, then they will be overridden instead of creating duplicate entries.

🧙‍♂️
GitLab