모듈:Linkwithtemplate: 두 판 사이의 차이

(Cerulean (토론)의 1498178판 편집을 되돌림)
태그: 편집 취소
편집 요약 없음
17번째 줄: 17번째 줄:
linkname = doc
linkname = doc
end
end
return '<span class="plainlinks new '..class..'">['..mw.site.server..'/index.php?'..
return frame:extensionTag ('templatestyles', '', { src = '모듈:Linkwithtemplate/styles.css'})..'<span class="plainlinks new '..class..'">['..mw.site.server..'/index.php?'..
mw.uri.buildQueryString {
mw.uri.buildQueryString {
    action = 'edit',
    action = 'edit',

2022년 3월 1일 (화) 17:45 판

설명문서 [편집] [역사] [새로고침]

asdf

연습장이나 사용자 문서에서 틀의 사용이나 수정을 연습할 수 있습니다.
분류는 /설명문서에 넣어주세요.

local p = {}

p.test = function(frame)
	local args = require('Module:Arguments').getArgs(frame)
	local doc = args[1] or ''
	local linkname = args[2] or nil
	local class = args['class'] or ''

	if mw.title.new(doc).exists then
		if linkname then
			return '[['..doc..'|'..linkname..']]'
		else
			return '[['..doc..']]'
		end
	else
		if linkname == nil then
			linkname = doc
		end
		return frame:extensionTag ('templatestyles', '', { src = '모듈:Linkwithtemplate/styles.css'})..'<span class="plainlinks new '..class..'">['..mw.site.server..'/index.php?'..
			mw.uri.buildQueryString {
		    	action = 'edit',
				preload = args['템플릿'],
		    	editintro = args['editintro'],
			    title = doc
			}..' '..linkname..']</span>'
	end
end
------------------------------------------------------------------------------------
return p