Categories
- Categories
Categories are a fundamental organizational tool within a MediaWiki-based wiki, allowing you to classify and group pages together based on their content. They are essential for navigation, discoverability, and maintaining a well-structured wiki. This article provides a comprehensive guide to understanding and using categories effectively, geared towards beginners.
What are Categories?
Imagine a physical library. Books aren't just randomly placed on shelves; they are organized by genre (Fiction, History, Science, etc.). Categories in a wiki serve the same purpose. They are labels you apply to pages to indicate what the page is *about*. When a user clicks on a category page, they see a list of all pages assigned to that category. This allows users to easily find related information.
Categories are not part of the page *content* itself, but rather metadata – data *about* the page. They don't appear within the main body of the article. Instead, they are added at the bottom of the page using a specific syntax.
How to Add a Page to a Category
The basic syntax for adding a page to a category is:
```wiki ```
Replace `CategoryName` with the name of the category you want to add the page to. For example, to add a page about apples to a category called "Fruits," you would add the following line to the bottom of the page:
```wiki ```
This tells the wiki software that this page belongs to the "Fruits" category.
Important Considerations:
- Case Sensitivity: Category names *are* case-sensitive. `` is different from ``. Consistency is key.
- Category Namespaces: Categories reside in the "Category" namespace. You do not need to explicitly specify this namespace when linking to a category from a page. The wiki software understands that any link starting with ````
For example, to make "Apples" a subcategory of "Fruits," you would add the following line to the "Category:Apples" page:
```wiki ```
This indicates that the "Apples" category is a more specific type of "Fruit." When you browse the "Fruits" category, you'll see "Apples" listed as a subcategory. Clicking on "Apples" will take you to the "Category:Apples" page.
You can create multiple levels of subcategories (e.g., "Red Apples" as a subcategory of "Apples," which is a subcategory of "Fruits"). However, excessive nesting can make navigation difficult, so use subcategories judiciously.
Hidden Categories
Sometimes, you want to categorize a page without making the category visible on the page itself. This is useful for maintenance categories, tracking tasks, or identifying pages that need attention. You can create hidden categories by starting the category name with a colon (`:`).
For example:
```wiki ```
The category "Pages needing attention" will be hidden from the bottom of the page, but it will still be used for categorization purposes. Hidden categories are typically used for internal wiki management and are not intended for general user browsing.
Category Pages
Each category has its own page. This page automatically displays a list of all pages assigned to that category and its subcategories. The format of the category page is determined by the MediaWiki software and can be customized with templates and other wiki features.
You can add content to category pages, such as a description of the category, links to related categories, or lists of important pages within the category. However, remember that category pages are primarily intended for listing pages, so keep the additional content concise and relevant.
Best Practices for Categorization
- Be Specific: Choose categories that accurately reflect the content of the page. Avoid overly broad categories that could include irrelevant pages.
- Be Consistent: Use the same categories for similar pages. Inconsistency can make it difficult to find information.
- Use Subcategories: Organize categories hierarchically to create a more manageable structure.
- Avoid Over-Categorization: Don't add a page to too many categories. This can clutter the category pages and make it difficult to find the information you're looking for. Generally, 2-5 relevant categories are sufficient.
- Review Existing Categories: Before creating a new category, check if an existing category already covers the topic.
- Discuss with Other Editors: If you're unsure about which categories to use, discuss it with other editors. Collaboration is key to maintaining a well-organized wiki.
- Regularly Review Categories: Periodically review the categories to ensure they are still relevant and accurate. Remove or merge categories as needed.
- Use Descriptive Category Names: Category names should be clear and easy to understand. Avoid jargon or abbreviations.
Advanced Categorization Techniques
- Defaultsort: The `
- Template:DEFAULTSORT – Controlling Article Categorization
Template:DEFAULTSORT is a crucial, yet often overlooked, feature within MediaWiki that significantly impacts how articles are organized and displayed in category listings. For beginner wiki editors, understanding and utilizing this template is essential for maintaining a clean, logical, and user-friendly wiki. This article will provide a comprehensive guide to DEFAULTSORT, covering its purpose, functionality, implementation, best practices, troubleshooting, and advanced considerations. We'll also connect its importance to broader wiki maintenance strategies.
What is DEFAULTSORT?
At its core, DEFAULTSORT dictates the *sort key* used when an article appears within a category. Without DEFAULTSORT, articles are categorized alphabetically based on their full page title. This can lead to a disorganized and confusing category listing, especially when dealing with articles that begin with articles like "The," "A," or "An," or with numerical prefixes.
Consider a category of articles about trading strategies. Without DEFAULTSORT, articles titled "A Beginner's Guide to Moving Averages," "The Power of Fibonacci Retracements," and "10 Tips for Day Trading" would appear at the top of the category, pushing more relevant entries further down. This is clearly undesirable.
DEFAULTSORT allows you to specify a different sorting key, effectively overriding the default alphabetical sorting based on the full title. In the examples above, you might use DEFAULTSORT keys like "Beginner's Guide to Moving Averages," "Power of Fibonacci Retracements," and "Tips for Day Trading," respectively, resulting in a much more logical and useful category arrangement.
Why is DEFAULTSORT Important?
- Improved Category Navigation: The primary benefit is a well-organized category structure, making it easier for users to find the information they need. Think of categories as the index of your wiki – a poorly organized index is useless.
- Enhanced User Experience: A logical category order boosts the overall user experience, encouraging exploration and knowledge acquisition. Users are more likely to find and utilize information when it’s easily accessible.
- Consistent Categorization: DEFAULTSORT promotes consistency across the wiki, ensuring that articles are categorized in a predictable and standardized manner.
- Reduced Maintenance: While it requires initial effort, implementing DEFAULTSORT correctly reduces the need for frequent category reorganization and cleanup. Proactive organization is always more efficient than reactive fixing.
- SEO Benefits (Indirectly): While not a direct SEO factor, a well-structured wiki with easily navigable categories can indirectly improve search engine rankings by increasing user engagement and time spent on site. This relates to overall wiki design principles.
How to Implement DEFAULTSORT
The implementation of DEFAULTSORT is remarkably simple. It involves adding the following code to the *bottom* of the page, typically within the category links section:
```wiki DEFAULTSORT:Your Sort Key ```
- Replace "Your Category Name" with the actual name of the category you're adding the page to.
- Replace "Your Sort Key" with the text you want the article to be sorted by within that category.
Example:
Let's say you're creating an article titled "The Impact of Volume Spread Analysis on Trading Decisions" and want to categorize it under "Trading Strategies." You would add the following to the bottom of the page:
```wiki DEFAULTSORT:Impact of Volume Spread Analysis ```
This will ensure that the article appears in the "Trading Strategies" category sorted alphabetically by "Impact of Volume Spread Analysis" rather than "The Impact..."
Best Practices for Choosing Sort Keys
Choosing the right sort key is critical. Here are some best practices:
- Remove Articles and Prepositions: Generally, remove leading articles ("The," "A," "An") and common prepositions ("of," "in," "on," "for," "to," "with") from the sort key. This ensures a more natural sorting order.
- Use Key Words: Focus on the most important keywords that describe the article's content.
- Maintain Consistency: Establish a consistent pattern for creating sort keys across the wiki. For example, if you always remove "The" from titles, do so consistently. Consistency is paramount in wiki standards.
- Consider Alternative Titles: If the article title is overly verbose, consider a shorter, more concise sort key that still accurately reflects the content.
- Handle Numbers Carefully: For articles with numbers in the title, decide whether to include the number in the sort key or spell it out. Consistency is key here. For example, "10 Tips for Day Trading" could be sorted as "10 Tips" or "Ten Tips."
- Use Lowercase: Sorting is generally case-insensitive, but using lowercase for sort keys can help avoid potential issues and maintain consistency.
- Avoid Special Characters: While MediaWiki generally handles special characters, it's best to avoid them in sort keys to prevent unexpected behavior.
Common Mistakes and Troubleshooting
- Placement: The DEFAULTSORT tag *must* be placed after the category tag. Placing it before will not work.
- Typos: Double-check for typos in both the category name and the sort key. Even a small error can prevent the article from being categorized correctly.
- Missing Tag: Ensure you haven't forgotten to add the DEFAULTSORT tag altogether.
- Conflicting Categories: If an article is assigned to multiple categories, each category should have its own DEFAULTSORT tag with a key appropriate for that category.
- Category View: Sometimes, changes to DEFAULTSORT may not be immediately visible in category listings. This is often due to caching. Try purging the page cache (see Help:Purge ) or waiting a few minutes for the cache to update.
- Hidden Categories: Ensure the category you are trying to sort into isn't a hidden category. Hidden categories, typically used for maintenance, won't display articles in the usual category view.
Advanced Considerations and Special Cases
- Multiple Categories: When an article belongs to multiple categories, you need a DEFAULTSORT tag for *each* category. The sort key should be tailored to the context of that specific category.
- Redirects: DEFAULTSORT applies to the target of a redirect, not the redirect page itself.
- Templates and Modules: If you're using templates or modules to generate category links, make sure the DEFAULTSORT tag is included within the template/module code. This is especially important for articles generated dynamically.
- Sorting by Date: For articles related to events or news, you might want to sort by date. Use a format like "YYYY-MM-DD" in the sort key to ensure correct chronological ordering.
- Sorting by Author: In some cases, you might want to sort by author. Use the author's last name as the sort key.
- Using Parameters in Templates: More complex scenarios may involve using parameters within templates to dynamically generate the sort key. This requires advanced knowledge of template programming.
DEFAULTSORT and Wiki Maintenance
Regularly reviewing and updating DEFAULTSORT tags is an important part of wiki maintenance. Pay attention to:
- New Articles: Always add a DEFAULTSORT tag when creating new articles.
- Category Reorganization: When you reorganize categories, review the DEFAULTSORT tags of the articles within those categories to ensure they are still appropriate.
- Article Title Changes: If you change an article's title, update the DEFAULTSORT tag accordingly.
- Broken Category Links: Check for broken category links and fix them. Broken links can disrupt the category structure.
- Category Size: Large categories can be difficult to navigate. Consider splitting them into smaller, more focused categories and updating the DEFAULTSORT tags accordingly. This relates to Information Architecture.
Connecting to Trading Concepts (Illustrative Examples)
To demonstrate the practical application of DEFAULTSORT in a trading-related context, consider these scenarios:
- **Category: Technical Indicators:**
* Article: "The Relative Strength Index (RSI) Explained" --> `DEFAULTSORT:Relative Strength Index` * Article: "Understanding Moving Average Convergence Divergence (MACD)" --> `DEFAULTSORT:MACD` * Article: "Bollinger Bands: A Beginner's Guide" --> `DEFAULTSORT:Bollinger Bands`
- **Category: Trading Strategies:**
* Article: "Scalping Strategies for Beginners" --> `DEFAULTSORT:Scalping Strategies` * Article: "Day Trading with Support and Resistance" --> `DEFAULTSORT:Day Trading Support Resistance` * Article: "Swing Trading Using Candlestick Patterns" --> `DEFAULTSORT:Swing Trading Candlestick Patterns`
- **Category: Market Analysis:**
* Article: "Fundamental Analysis vs. Technical Analysis" --> `DEFAULTSORT:Fundamental Technical Analysis` * Article: "Elliott Wave Theory Explained" --> `DEFAULTSORT:Elliott Wave Theory` * Article: "The Role of Sentiment Analysis in Trading" --> `DEFAULTSORT:Sentiment Analysis Trading`
These examples demonstrate how DEFAULTSORT helps organize articles related to concepts like candlestick patterns, Fibonacci retracement, Ichimoku Cloud, volume analysis, support and resistance, risk management, position sizing, chart patterns, trading psychology, backtesting, algorithmic trading, market sentiment, correlation analysis, volatility indicators, trend following, mean reversion, momentum trading, breakout strategies, gap analysis, price action, economic indicators, and fundamental analysis. A properly sorted category improves the user's ability to quickly find information on these crucial trading topics. Understanding market microstructure is also important.
Help:Contents Help:Editing Help:Categories Help:Templates MediaWiki WikiProject:Standards Special:Search Manual:Linking Manual:Talk pages Help:Purge` magic word allows you to specify a sort key for pages within a category. This is useful for ensuring that pages are listed in a logical order. For example, if you have a category for "Authors," you might use `` to sort the authors alphabetically by last name.
- Hiding Categories from Category Pages: Using the `` magic word will hide a category from the category page itself, but the page will still be listed in the category. This is useful for maintenance categories that shouldn't be visible to regular users.
- Conditional Categorization: Using parser functions, you can conditionally add a page to a category based on certain criteria. This is useful for creating dynamic categories that change based on the content of the page.
Categories and Search
Categories are closely integrated with the wiki's search function. When you search for a term, the search results will often include pages from relevant categories. This makes categories an important tool for discoverability.
Categories and Templates
Templates can be used to automatically add pages to categories. This is useful for creating standardized templates for different types of pages. For example, a template for "Book" pages could automatically add the page to the "Literature" category.
Importance in Wiki Maintenance
Categories are not just for users; they are vital for wiki maintenance. They allow administrators and editors to:
- Identify pages that need updating.
- Find pages that are missing information.
- Track the growth of the wiki.
- Ensure consistent categorization.
- Manage large amounts of content effectively.
Categories in Relation to Other Wiki Features
- Infoboxes: Infoboxes often include category links, allowing you to quickly categorize pages based on their subject matter.
- Navigation Templates: Navigation templates can link to categories, providing users with easy access to related pages.
- Portals: Portals can feature categories, highlighting important topics and resources.
- Lists: Lists can be categorized, allowing you to organize lists of items by topic.
Technical Analysis and Trading Related Categories (Examples)
To illustrate the application of categories in a specific domain, here are some examples related to technical analysis and trading:
- * * * * * * * * *
Further subcategories could include:
- * (e.g., Relative Strength Index, MACD, Stochastic Oscillator)
- (e.g., Flags, Pennants, Triangles)
- (e.g., Head and Shoulders, Double Top, Double Bottom)
- * * * * * * * * * * * * * * * * * * * * * * * (While distinct, can be categorized for related articles)
By utilizing a comprehensive categorization system, a wiki dedicated to trading and technical analysis can become a valuable resource for traders of all levels. Effective categorization simplifies information retrieval and fosters a more organized learning environment.
Help:Categories Help:Templates MediaWiki Special:Categories Wikipedia:Categories Talk:Main Page Manual:Pages Manual:Linking Manual:Magic words Special:Search