پودمان:Details: Difference between revisions

From faraghaib
Jump to navigation Jump to search
admin>Admin
صفحه‌ای تازه حاوی «--[[ -- This module produces a "For more details on this topic" link. It implements -- the {{details}} template. --]] local mHatnote = require('Module:Hatnote') local mArguments -- lazily initialise local p = {} function p.details(frame) mArguments = require('Module:Arguments') local args = mArguments.getArgs(frame, {parentOnly = true}) local page = args[1] local topic = args[2] if not page then return mHatnote.makeWikitextEr...» ایجاد کرد
 
admin>Admin
m ۱ نسخه واردشده
(No difference)

Revision as of 22:34, May 25, 2025

--[[ -- This module produces a "For more details on this topic" link. It implements -- the Template:Details template. --]]

local mHatnote = require('Module:Hatnote') local mArguments -- lazily initialise

local p = {}

function p.details(frame) mArguments = require('Module:Arguments') local args = mArguments.getArgs(frame, {parentOnly = true}) local page = args[1] local topic = args[2] if not page then return mHatnote.makeWikitextError( 'هیچ نام صفحه‌ای تعیین نشده است', 'الگو:Details#خطاها', args.category ) end local options = { selfref = args.selfref, } return p._details(page, topic, options) end

function p._details(page, topic, options) page = mHatnote._formatLink(page) topic = topic or 'این موضوع' local text = string.format('برای آگاهی از جزئیات بیشتر دربارهٔ %s، %s را ببینید.', topic, page) options = options or {} options.extraclasses = 'boilerplate seealso' return mHatnote._hatnote(text, options) end

return p