Osclass 8.3 has introduced a major feature called "Custom Search Rules" in the Settings > Permalinks section. This feature enables you to create up to 26 custom search rules based on active search parameters. These rules allow you to create flexible and optimized URLs for your search pages, improving user experience and making the search more intuitive.
Custom Search Rules allow you to define URL structures based on search parameters like city, category, price, etc. These rules can be either strict or fuzzy, meaning you can choose to accept only exact parameters or allow extra parameters for greater flexibility.
The custom search rules are fully compatible with plugin/theme custom parameters and meta fields, ensuring they are customizable for various use cases. You can create more specific search URLs, for example, linking certain categories or regions with unique URL patterns.
How Custom Search Rules Work
{sCity}/{sCategory} → /a/bremen/for-sale{sRegion}/{sCity}/{sCategory} → /b/alabama/bremen/for-salecat:{sCategory}/city:{sCity}/min-{sPriceMin}-eur → /c/category:for-sale/city:bremen/min-55-eurCreating Custom Search Rules
To create a custom search rule, go to Settings > Permalinks, where you’ll find the option to enable custom search rules. Here are some examples of different rule formats you can use:
{sCity}/{sCategory}{sRegion}/{sCity}cat:/{sCity}-from/min-{sPriceMin}-eurThese rules allow you to structure your URLs based on relevant search parameters such as location, price, and category.
Technical Considerations
When using custom rules, remember that:
lang, iPage, sShowAs, sOrder, and iOrderType are ignored in the rule and added at the end of the rule.How to Use Custom Search Rules Effectively
Custom rules should be used carefully as improper setup can cause unexpected behavior. Below are some tips for using custom search rules:
{sCity}/{sCategory}) and gradually add more specific ones (e.g., cat:{sCategory}/city:{sCity}/min-{sPriceMin}-eur).sCategory, sCountry, sRegion, sPriceMin, etc., in your custom rules.Limitations and Notes
Conclusion
Custom Search Rules in Osclass allow for advanced URL customizations that enhance the search experience. By setting up rules based on parameters like city, category, and price, you can create search URLs that are more intuitive and relevant for your users. However, it's important to carefully manage these rules to avoid conflicts and ensure smooth functionality.
Where to Access:
You can enable and configure custom search rules in Settings > Permalinks in your Osclass admin panel.