قالب:كاتلوج كتاب

من ويكي الكتب
توثيق القالب[عرض] [عدل] [تاريخ] [مسح الكاش] [استخدامات]

يضع هذا القالب الصفحة التي يتم استخدامه فيها ({{FULLPAGENAME}}) إلى تصنيفات مناسبة، وذلك بناءً على اصطلاحات تسمية الصفحات وتصنيفها.

الاستخدام[عدل]

عندما يُستخدم القالب بدون مُعلمات، فإنه:

  • يضع الصفحات الفرعية للكتاب في تصنيف الكتاب (تصنيف:كتاب:{{اسم كتاب}}) ويصنفها حسب اسم الفصل.
  • يضع قوالب الكتاب في تصنيف قوالب الكتاب (تصنيف:كتاب:{{اسم كتاب}}/قوالب). سيعمل هذا فقط إذا بدأت قوالب الكتاب بـ   قالب:{{اسم كتاب}} .
  • يضع تصنيف قوالب الكتاب في تصنيف الكتاب الرئيسي وفي  تصنيف:قوالب خاصة بالكتب .
  • places any other category in its parent, sorted by the category's last name. The parent has the same name except removing everything from the last slash on; and the last name is the part that was removed after that last slash. For example, Category:My Book/Images  would go in  Category:My Book  with sort key  Images .

Parameters[عدل]

Optional parameter  filing=deep  changes the behavior on book pages, so that a book page with more than one slash in its name is placed in a subcategory of the category where its parent page would be placed, sorted by the page's last name. For example, using  {{BookCat|filing=deep}}  on page  My Book/Maps/Asia  would put that page in  Category:My Book/Maps  with sort key  Asia .

Optional parameter  template-filing=deep  changes the behavior on template pages to deep filing (so  Template:My book/Maps/Asia  would go in  Category:My book/Templates/Maps).

Optional parameter  sort or sortkey specifies a sort key to be used for categorization instead of relying on {{BOOKSORTKEY}}.

Optional first unnamed parameter is a full page name to use instead of the {{FULLPAGENAME}} of the current page.

An alternative template {{كاتلوج كتاب/تشخيص}} reports the output of {{كاتلوج كتاب}} (with or without parameters) as an inert string, rather than categorizing the current page.

Examples[عدل]

قالب:Magic word templates/book page examples

Internals[عدل]

This template itself only contains the logic to sort out the identity of the target page; deducing the appropriate categorization is then delegated to {{كاتلوج كتاب/أساس}}. As of this writing, parameters assembled here are namespace, pagename, fullpagename, and sortkey; the first unnamed parameter is removed, and all other parameters are passed through to the subtemplate.

See also[عدل]