• category education
    • In this tutorial, we present how to work with the fetch component of the Elanat framework.

      The Fetch component allows the user to extract database data and then combine it with HTML tags or other values and display these values in any part of the website he wants.

      This component is very powerful and practical and does a lot of work.

    For example:

    •  - Show avatars of online users
       - List of latest content by time
       - The list of the latest content based on the number of views
       - List of tags of the week
       - Create rss
       - Create a sitemap
       - Grant temporary access
       - Delete content after display
       - And many other things

    Note: You can simply call a series of sql commands (add, edit and delete) in the database with or without data display.

    There are two ways to add a add-on in the fetch component; one is to create by writing a query and the other is to upload a fetch add-on

    Here we teach how to create a add-on in the fetch component by writing a query.

    Step 1:
    After logging in, enter the admin panel; then select the Add-ons system in the upper bar and after displaying the list of components, click on the fetch component and then click on the add button to open the space to add a new fetch.
    Choose a name for your add-on in the fetch name field and then enter your query in the fetch sql query field and then click on the get sql query column button.

    Step 2:
    After completing the steps of step 1, you will see the list of selected columns in the sql query column section. Below, you can see the fetch box, which repeats the values of fetch list item with the value of $_asp item; It changes in the fetch box. In the fetch list item section, you can combine database variables with HTML tags.

    Fetch component tutorial add fetch 2

    Step 3:
    Click on the fetch active and fetch public access show checkboxes to activate them; In the fetch menu section, you can select a part of the website where you would like your fetch add-on to appear. Then click on the add fetch button.

    Now you can see the result.

    Fetch component tutorial view fetch

    Note: You can add the fetch add-on variable in any part of a page add-on so that the fetch add-on is displayed on that page. For this, you must activate the checkbox called page use fetch on that page.

    The fetch add-on variable is written as follows:
    $_fetch_name example;
    The fetch name example value is your fetch name.

    last comment
    please login or sign up to post a comment login - sign up