Topic on Extension talk:Cite

Jump to navigation Jump to search

Reusing References With Templates

Jer Hughes (talkcontribs)

I use templates with my citations. On my template page I have this:

{{#tag:ref|{{{author|}}}. ''{{{title|}}}''. {{{publisher|}}}, {{{year|}}}. {{{page|}}}.|name={{{name|}}}}}

But my problem is when trying to reuse the same source. For that I currently have:


The first citation works fine, shows [1] down below with my custom text. But instead of showing [1] for the reused citation, it shows [2.0][2.1].

How can I have my template reuse references?

My full Template:Cite page looks like:

{{#ifeq:{{#lc:{{{1|}}}}}|book|{{#tag:ref|{{{author|}}}. ''{{{title|}}}''. {{{publisher|}}}, {{{year|}}}. {{{page|}}}.|name={{{name|}}}}}}}{{#if:{{{1|}}}||{{#if:{{{name|}}}|{{#tag:ref||name="{{{name|}}}"}}}}}}

And I'm using that template like:

Some text{{Cite|book|ref=ref1|author=[[Author]]|title=Book Title|publisher=Big Publisher|year=2000|page=1}}

And later on the same page:

More text{{Cite|name=ref1}}

Jer Hughes (talkcontribs)

Never mind, I had some issues with the magicwords. I thought it was an issue of order of operations issue of when wikicodes resolve and scripts run, but it was just a typo.