- [Case Studies](https://www.mergado.com/category/case-studies)
- [eCommerce tips](https://www.mergado.com/category/ecommerce-tips)
- [Online Store Solutions and Platforms](https://www.mergado.com/category/online-store-solutions-and-platforms)
- [Mergado Pack](https://www.mergado.com/category/mergado-pack)
- [Mergado tips](https://www.mergado.com/category/mergado-tips)
- [Mergado News](https://www.mergado.com/category/mergado-news)
- [eCommerce News](https://www.mergado.com/category/ecommerce-news)
- [How to use Mergado](https://www.mergado.com/category/how-to-use-mergado)
- [Interviews with e‑commerce gurus](https://www.mergado.com/category/interviews-e-commerce-gurus)
- [Extensions](https://www.mergado.com/category/apps-bidding-image-marketing-and-more)
- [Expansion with Mergado](https://www.mergado.com/category/expansion-with-mergado)
- [Mergado Lifestyle](https://www.mergado.com/category/mergado-lifestyle)
 



 

 1. [  Home  ](https://www.mergado.com/)
2. [     Mergado Blog  ](https://www.mergado.com/blog)
3. [     Mergado News  ](https://www.mergado.com/category/mergado-news)
4. <a class="flex items-center gap-2 hover:underline" href="" itemid="" itemprop="item" itemscope="" itemtype="https://schema.org/Thing">    **Oneliner accelerates the creation of queries in Mergado** </a>
 
  

 

#  **Oneliner accelerates the creation of queries in Mergado** 

 

 

 [    ![](https://www.mergado.com/sites/default/files/perm/user-avatar/23021961102131189073595481259913287n.jpg)   Lukáš Horák  ](https://www.mergado.com/blog/lukas-horak) [Mergado News](https://www.mergado.com/category/mergado-news) 

14. 7. 2021

2 minutes read

 

 

 

 

 

  ![Oneliner accelerates the creation of queries in Mergado](https://www.mergado.com/sites/default/files/field/image/oneliner-en.png)  

We develop new functionalities to help Mergado users to perform tasks **faster and more conveniently**. One of the new features is *oneliner*. As its name implies, you can **search for new text in frequently searched elements in one line**.



 

 

 
                function tableOfContents() {
                  return {
                    headings_menu: [],
                    heading_active: '', // Added to track the active section
                    shouldBeSticky: false,

                    generateToC() {
                      const headings = document.querySelectorAll('.js-article-full-headings h2, .js-article-full-headings h3');
                      let headingMap = {};

                      headings.forEach((heading) => { // Use an arrow function to maintain `this` context
                        // Normalize heading text to remove diacritics, then replace non-alphanumeric characters with dashes
                        var normalizedText = heading.textContent.normalize("NFD").replace(/[\u0300-\u036f]/g, ""); // Remove diacritics
                        var id = heading.id ? heading.id : normalizedText.trim().toLowerCase()
                          .split(' ').join('-').replace(/[^a-z0-9\-]/ig, ''); // Updated regex to replace non-alphanumeric characters
                        headingMap[id] = headingMap[id] !== undefined ? ++headingMap[id] : 0;

                        // Use the updated `id` with diacritics removed for the heading id and the TOC
                        const finalId = headingMap[id] ? `${id}-${headingMap[id]}` : id;
                        this.headings_menu.push({
                          id: finalId,
                          title: heading.textContent,
                          level: heading.tagName.toLowerCase(), // Track heading level
                          active: false, // Initially set active to false
                        });
                        heading.id = finalId;
                      });
                    },

                    checkStickyNeeded() {
                      const ul = this.$el.querySelector('ul');
                      if (ul) {
                        this.shouldBeSticky = ul.scrollHeight < window.innerHeight;
                      }
                    },

                    setActiveHeading() {
                      // disabled not working with active state on click
                      // add @scroll.window="setActiveHeading()" to the parent div

                      // const headings = document.querySelectorAll('.js-article-full-headings h2');
                      // let activeHeading = '';
                      // let closestHeadingDistance = Infinity;

                      // headings.forEach((heading) => {
                      //   const rect = heading.getBoundingClientRect();
                      //   const offset = rect.top - window.innerHeight / 2; // Consider heading in the middle of the screen as active

                      //   if (offset < 0 && Math.abs(offset) < closestHeadingDistance) {
                      //     activeHeading = heading.id;
                      //     closestHeadingDistance = Math.abs(offset);
                      //   }
                      // });

                      // // Update the active state in headings_menu
                      // if (activeHeading !== this.heading_active) {
                      //   this.headings_menu = this.headings_menu.map(item => ({
                      //     ...item,
                      //     active: item.id === activeHeading,
                      //   }));
                      //   this.heading_active = activeHeading;

                      // }
                    },

                    setActiveItem(clickedId) {
                      this.headings_menu.forEach(item => {
                        item.active = (item.id === clickedId);
                      });
                      this.heading_active = clickedId; // Optionally update the heading_active property if used
                    },
                  };
                }
               1. <a :class="{ 'border-r-[3px] border-secondary': item.active, 'text-sm': item.level === 'h3' }" :href="'#' + item.id" class="inline-block text-balance hover:underline p-0.5 pr-3">  — </a>
  



 

We develop new functionalities to help Mergado users to perform tasks **faster and more conveniently**. One of the new features is *oneliner*. As its name implies, you can **search for new text in frequently searched elements in one line**. Let’s take a closer look at what it looks like.

## Oneliner works similarly to full-text search

The new feature provides an easy way to create search terms **without clicking through additional windows or extra clicks**. This simple line helps you quickly find a query by product name or [element](https://www.mergado.com/tag/elements).



 

 [  ![](https://www.mergado.com/sites/default/files/perm/paragraph-image/oneliner-0.png)  ](https://www.mergado.com/sites/default/files/perm/paragraph-image/oneliner-0.png) 

The original way of writing conditions did not disappear from Mergado. Therefore, you can continue to make queries as you would. But we believe that when you try the oneliner, you begin to like it for its speed and prefer it.

### What else is new in queries

1\. You can now control the creation of queries only **with the keyboard** (cursor arrows, condition characters, TAB).

2\. Within the value insinuator, you can search for the **results** using [regular expressions](https://www.mergado.com/tag/regular-expressions).



 

 [  ![](https://www.mergado.com/sites/default/files/perm/paragraph-image/screenshot-devmergadocom-20210714-133042.png)  ](https://www.mergado.com/sites/default/files/perm/paragraph-image/screenshot-devmergadocom-20210714-133042.png) 

3\. We’ve added the option to click **multi-conditional queries**.



 

 [  ![](https://www.mergado.com/sites/default/files/perm/paragraph-image/oneliner-3-moreconditions.png)  ](https://www.mergado.com/sites/default/files/perm/paragraph-image/oneliner-3-moreconditions.png) 

4\. Click the **Reset** button to clear the entire form.

5\. You can look for the **value of an element in another element** in the “simple interface.”



 

 [  ![](https://www.mergado.com/sites/default/files/perm/paragraph-image/oneliner-4-elementinelement.png)  ](https://www.mergado.com/sites/default/files/perm/paragraph-image/oneliner-4-elementinelement.png) 

6\. You can (optionally) add a **note** to the query.



 

 [  ![](https://www.mergado.com/sites/default/files/perm/paragraph-image/oneliner-5-description.png)  ](https://www.mergado.com/sites/default/files/perm/paragraph-image/oneliner-5-description.png) 

7\. In the element insinuator you can find the **verbal meaning** of the most frequently used elements and the signaling if there are **no values** in the given element on the input.



 

 [  ![](https://www.mergado.com/sites/default/files/perm/paragraph-image/oneliner-6-meaning.png)  ](https://www.mergado.com/sites/default/files/perm/paragraph-image/oneliner-6-meaning.png) 

8\. We have provided **more space for saved queries and their management**. They have their own dedicated tab under which you can easily manage them.



 

 [  ![](https://www.mergado.com/sites/default/files/perm/paragraph-image/oneliner-7-saved.png)  ](https://www.mergado.com/sites/default/files/perm/paragraph-image/oneliner-7-saved.png) 

At Mergado, we’re constantly developing new features to help you manage your advertising. Have you been using our tool only for a short time? **Watch** our [video guide](https://www.youtube.com/playlist?list=PL1cYti7m-wB9znQbMcIyKyJSU7MM4kfV-). It provides you with **all the basic information** on how to use our tool.

### **Read more:**



 

 [    ![](https://www.mergado.com/sites/default/files/perm/image/ai_boost-1.jpg)  

### What should a proper client context look like for performance specialists?

 

 ](https://www.mergado.com/blog/master-prompt-eshopy-b2c) 

 [    ![](https://www.mergado.com/sites/default/files/perm/image/uawc_cs_en.jpg)  

### How Feed Optimization Unlocked Meta Ads Performance without Increasing Ad Spend

 

 ](https://www.mergado.com/blog/feed-optimization-for-meta-ads) 

 [    ![](https://www.mergado.com/sites/default/files/perm/image/how_to_sell_successfully_on_idealo.jpg)  

### How to Sell Successfully on idealo

 

 ](https://www.mergado.com/blog/successful-sale-on-idealo) 

 

 

 [    ![](https://www.mergado.com/sites/default/files/perm/user-avatar/23021961102131189073595481259913287n.jpg)  ](https://www.mergado.com/blog/lukas-horak)###  [ Lukáš Horák ](https://www.mergado.com/blog/lukas-horak) 

Lukáš takes care of most of the Czech and English communication in Mergado. Through blogs, e‑mail, and social networks, he regularly supplies readers with e‑commerce news and news and tips from Mergado. In his time off, he enjoys simple things like badminton, digging the hidden gems of the 80’s, and seafood served with red wine.

 

 

 

 

 

 

 

 

 

## What you *might be interested in next*

 

 [    ![](https://www.mergado.com/sites/default/files/perm/image/mergado_chatgpt_2.jpg)  

### ChatGPT Shopping: The Future Is Already Here

 

 ](https://www.mergado.com/blog/chatgpt-shopping-future-already-here) 

 [    ![smart value insertion article](https://www.mergado.com/sites/default/files/perm/image/smart_insertion_value.png)  

### Introducing smart value insertion. It will speed up the creation of bulk rules

 

 ](https://www.mergado.com/blog/smart-value-insertion) 

 [    ![](https://www.mergado.com/sites/default/files/perm/image/mergado-element-path.jpg)  

### MERGADO 2 has new tool. It will help you to test element path

 

 ](https://www.mergado.com/blog/mergado-2-element-path-tool) 

 

 

 

## Don’t miss *anything*

 Sign up for our newsletter 

   

       

   By logging in, you agree that we will process your data by the [terms of personal data protection](https://www.mergado.com/cookies). 

  Thank you, you have successfully joined our subscriber's list. 

 

 

 
      function ml_webform_success_5807248() {
        var r = ml_jQuery || jQuery
        r('.ml-subscribe-form-5807248 .row-success').show(), r('.ml-subscribe-form-5807248 .row-form').hide()
      }