Exceptions for style applicable rulesAll manuals
Exceptions functionality available in FreeStyler 2.4.1 and later.
Sometimes installed styles are applied to the pages you do not want them to be used. In this cases you can edit styles directly with style editor or disable style on selected URLs in just a few clicks with an exception mechanism, described below. Also, if you do not want to apply site-specific and global styles simultaneously on the same pages, you can use specialized conflict resolution feature.
Exceptions allow you to disable the selected style on the desired URLs. If the style is applied on the page you do not want, just add an exception for current URL and it will prevent style from displaying here in future.
There are following ways to add exception rule.
Add exceptions via the menu
The easiest way to configure exceptions is to add new exceptions via the menu directly on those pages where you want to restrict the style.
- Navigate to the page where you want to restrict style applying.
- Open menu, locate style you want to restrict, and go to the style's details pane:
- Click "Do not apply style here" - exception adding dialog will appear:
- Here you can configure the rule either by selecting domain or path with corresponding controls, or choose "Custom path" and edit the rule manually. You can use wildcards to specify rules.
- Add a rule by clicking Apply.
- Now the selected style will not be applied to the URLs matching the added exception.
You can also manage exceptions for the selected style via the menu - see “Doesn't applied to:” section for the list of active exceptions and click “Edit list” to edit or remove existing exceptions.
Add or remove exceptions via Styles Manager
Exceptions for all styles may also be managed via Styles Manager.
To access editing functionality do the following:
- Open styles manager
- Locate style you want to restrict and expand its details by clicking wrench icon.
- Click "Edit list" in "Doesn't applied to:" section - rules editing dialog will appear:
- To add new exception click "+ Add path" and manually specify wildcard for exception rule. You can use wildcards to specify rules.
- To remove existing exception click ( x ) beside the rule.
- You can also edit any existing exception rules.
- Click Apply to save changes.
You can use wildcards to specify many URLs in one rule. You can use "*" symbol as wildcard - it means zero or more of any symbols. For example, "*://freestyler.ws/" will match a main page of FreeStyler.WS site and "*://freestyler.ws/*" (additional asterics in the end) will match any page on FreeStyler.WS site, "*://freestyler.ws/style/*" will match only style pages from the catalog.
Local nature of the exceptions
Please note that the exceptions are not a part of the style and they won’t be uploaded to the FreeStyler.WS site. All the exceptions you create are stored only locally as an additional settings. It means that when you delete a style, all configured exceptions for this style, will be lost. If you decide to re-install that style later, you’d need to configure all the exceptions from the scratch.
Meanwhile the export/import functionality keeps exceptions settings, so you can safely restore all your styles after FreeStyler extension reinstall or move your installed styles with all settings to the another computer.
Exceptions functionality available in FreeStyler 2.4.1 and later.
Q: Why styles are applied to the pages they should not be applied to? Why do I need to configure exceptions? Why can’t I get a ready-to-use style in a single click?
A: There are many reasons for such a behaviour. Sites may change layout in the part of their pages; sites can have different sections for which author of the style has not intended to apply style at all (and this section may have significantly different layout). There also may be private sections of the sites like admin panels, user profiles etc., to which author of the style does not have access and can't adopt. Such pages often have layout that differs from the main site, so the style made for main site may work incorrectly on these pages. For all of these cases exceptions feature was created, so it will be easy for you to solve simple problems with no need to edit the whole style.
Q: I’ve added an exception for site, but the style is still active on this site.
1. Make sure that added exception covers all necessary pages. For example, “*://freestyler.ws/style/*” will cover any style page, but will not cover profile pages like http://freestyler.ws/user/2/admin and editor http://freestyler.ws/draft-edit/. Also, “*://freestyler.ws/” will only match homepage, but no other page. To add whole site to the exception use “*://freestyler.ws/*” (please note the asterisk at the end).
2. Make sure you considered both http and https version of the URL in your exception. You can use wildcard like the “*://freestyler.ws/*” (please note the asterisk at the beginning) to handle all protocols in one exception.
3. Note that the exceptions are set for each style separately. So, if you have several styles installed and you’ve added exception for one of them, other styles still will be applied as is. You need to add exceptions separately to every style you want to restrict
Q: I’ve added an exception and style does not apply anymore, but some fragments of a site (e.g. social networks “Like” blocks etc.) are still stylized.
1. make sure that no other styles has been applied to the page, as it can change appearance of these blocks.
2. some blocks may be inserted as 'iframes' from the other domains (this is a common practice for social blocks). In such a case blocks may be stylized with styles installed for those domains. The only way to fix this is to manually find and edit corresponding styles.
Q: I use the global style for all sites and I like it. But I also use some styles, developed for particular sites and I do not want the global style to be applied for those sites. Should I add exceptions for all those sites manually?
A: You can add exceptions manually but it's better to use our feature developed especially for resolving overlapping of global and site-specific styles. In style manager locate the global style, expand details, find "Style will be disabled if the following styles are active:" block and click "Configure list", then set checkboxes for all desired site specific styles. Read more here.
Q: Why do I see less exceptions in the menu than in manager for specific style? Why can't I find some exceptions added earlier in the menu? Why does the exceptions list in the menu for specific style is changing when I navigate to another page?
A: In the menu we can only display exceptions matching the current page. You can see all exceptions for selected style in the manager.
Q: My case is so complicated, that exceptions can't help me to solve it. How can I manage styles’ more precisely?
A: You can always edit style manually. This will allow you to use full-featured regular expressions to specify style rules and you will also be able to change the way the style changing page appearance by editing CSS. See the following pages (here and here) to learn more about editing the style.