پرش به محتوا
منوی اصلی
منوی اصلی
انتقال به نوار کناری
نهفتن
ناوبری
صفحهٔ اصلی
تغییرات اخیر
مقالهٔ تصادفی
راهنما دربارهٔ مدیاویکی
صفحههای ویژه
ویکیهزاره
جستجو
جستجو
ظاهر
ساخت حساب
ورود
ابزارهای شخصی
ساخت حساب
ورود
صفحههایی برای ویرایشگرانی که از سامانه خارج شدند
بیشتر بدانید
مشارکتها
بحث
در حال ویرایش
الگو:وقتی در صفحه مبنا/توضیحات
الگو
بحث
فارسی
خواندن
ویرایش مبدأ
نمایش تاریخچه
ابزارها
ابزارها
انتقال به نوار کناری
نهفتن
کنشها
خواندن
ویرایش مبدأ
نمایش تاریخچه
عمومی
پیوندها به این صفحه
تغییرات مرتبط
اطلاعات صفحه
ظاهر
انتقال به نوار کناری
نهفتن
هشدار:
شما وارد نشدهاید. نشانی آیپی شما برای عموم قابل مشاهده خواهد بود اگر هر تغییری ایجاد کنید. اگر
وارد شوید
یا
یک حساب کاربری بسازید
، ویرایشهایتان به نام کاربریتان نسبت داده خواهد شد، همراه با مزایای دیگر.
بررسی ضدهرزنگاری. این قسمت را پر
نکنید
!
{{documentation subpage}} {{high-risk| 350,000+ }} <!-- PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE --> This is the {{tl|basepage subpage}} meta-template. This template helps other templates detect if they are on a '''basepage''', '''subpage''' or '''subsubpage'''. === Usage === This template takes one or more parameters, like this: <pre> {{basepage subpage | Basepage text | Subpage text }} </pre> If the template is on the page "User:Example", it shall return this: :{{basepage subpage | Basepage text | Subpage text | page = User:Example }} If the template is on "User:Example/test" or "User:Example/test/test" or any page lower than that, it will return this: :{{basepage subpage | Basepage text | Subpage text | page = User:Example/test/test }} This template can also detect "subsubpages", like this: <pre> {{basepage subpage | Basepage text | Subpage text | Subsubpage text }} </pre> If the template is on "User:Example/test/test" or any page lower than that, it will return this: :{{basepage subpage | Basepage text | Subpage text | Subsubpage text | page = User:Example/test/test }} By using an empty parameter you can make it so the template doesn't render anything for some specific page type. Like this: <pre> {{basepage subpage | Basepage text | Subpage text | }} </pre> The code above will render nothing when on "User:Example/test/test" or lower, but will return this when on "User:Example/test": :{{basepage subpage | Basepage text | Subpage text | | page = User:Example/test }} === The "page" parameter === For testing and demonstration purposes this template can take a parameter named '''page'''. Like this: <pre> {{basepage subpage | Basepage text | Subpage text | page = User:Example/test }} </pre> No matter on what kind of page the code above is used it will return this: :{{basepage subpage | Basepage text | Subpage text | page = User:Example/test }} The '''page''' parameter makes this template behave exactly as if on that page. Thus, if a subsubpagename like "User:Example/test/test" is fed, then it returns the subsubpage text if there is one, otherwise it returns the subpage text. The pagename doesn't have to be an existing page. If the parameter is empty or undefined, the name of the current page determines the result. You can make it so your template also understands the '''page''' parameter. That means you can demonstrate the different appearances of your template in the documentation for your template. Then do like this: <pre> {{basepage subpage | Basepage text | Subpage text | page = {{{page|}}} }} </pre> === Technical details === Templates have a problem to handle parameter data that contains equal signs "<code>=</code>". But that is easily solved by using numbered parameters. Like this: <pre> {{basepage subpage | 1 = Basepage text | 2 = Subpage text | 3 = Subsubpage text | page = {{{page|}}} }} </pre> This template detects subpages even when used in namespaces that doesn't have the MediaWiki [[meta:Link#Subpage feature|subpage feature]] enabled. Thus this template works the same in all namespaces. === See also === {{pagename detect see also}} <includeonly> <!-- CATEGORIES AND INTERWIKIS HERE, THANKS --> [[Category:Wikipedia metatemplates]] </includeonly>
خلاصه:
لطفاً توجه داشته باشید که همهٔ مشارکتها در ویکیهزاره ممکن است توسط دیگر مشارکتکنندگان تغییر یابند، ویرایش یا حذف شوند. اگر نمیخواهید نوشتههایتان بیرحمانه ویرایش شوند؛ بنابراین، آنها را اینجا ارائه نکنید.
شما همچنین به ما تعهد میکنید که خودتان این را نوشتهاید یا آن را از یک منبع با مالکیت عمومی یا مشابه آزاد آن برداشتهاید (
ویکیهزاره:حق تکثیر
را برای جزئیات بیشتر ببینید).
کارهای دارای حق تکثیر را بدون اجازه ارائه نکنید!
لغو
راهنمای ویرایش
(در پنجرهٔ تازه باز میشود)
صفحههای گنحاندهشده در این صفحه:
الگو:Basepage subpage
(
ویرایش
)
الگو:Documentation subpage
(
ویرایش
)
الگو:High-risk
(
ویرایش
)
الگو:Mbox
(
ویرایش
)
الگو:Pagename detect see also
(
ویرایش
)
الگو:Tl
(
ویرایش
)
الگو:الگو
(
ویرایش
)
الگو:زیرصفحه توضیحات
(
ویرایش
)
الگو:وقتی در صفحه مبنا
(
ویرایش
)
الگو:پراستفاده
(
ویرایش
)
پودمان:Arguments
(
ویرایش
)
پودمان:High-use
(
ویرایش
)
پودمان:Message box
(
ویرایش
)
پودمان:Message box/configuration
(
ویرایش
)
پودمان:Message box/ombox.css
(
ویرایش
)
پودمان:Numeral converter
(
ویرایش
)
پودمان:Transclusion count
(
ویرایش
)
پودمان:Transclusion count/data/و
(
ویرایش
)
پودمان:Yesno
(
ویرایش
)
جستجو
جستجو
در حال ویرایش
الگو:وقتی در صفحه مبنا/توضیحات
افزودن مبحث