Topic on Extension talk:PDFEmbed

Using page number as variable in template

3
Summary by WikiTeq

Use #tag parser function

ElmerG99 (talkcontribs)

Hey, need some assistance.

I have everything working well, except for one thing.

I have a page I'm trying to allow users to display PDFs on, and some of those may need to have other PDFs displayed.

So I'm using a {{{pagenum}}} to try to pass the provided page number through. I know it's pulling the number correctly because I can display it by itself elsewhere on the page. But it's not parsing in <pdf page={{{pagenum}}}"File:filename.pdf</pdf>

Any ideas or thoughts?

WikiTeq (talkcontribs)

You should do something like:

{{#tag:pdf 
|File:filename.pdf 
|page={{{pagenum}}} 
}}

See here for more info.

ElmerG99 (talkcontribs)

Hrm.

So that just gave me a URL or Filepath does not exist. error now. I'm using a {{{filename}}} call for the file as FIle:{{{filename}}}. WHen it's in the template, even with File:Actual_File_Here.pdf it throws an error. If I put it into a test wiki with hard parameters it displays fine.

EDIT: Aha, it won't take a partial. I have to pass the full FIle:File_Name_Here.pdf, I can't just pass the filename.pdf.


That's awesome, thank you so much.