Re: creating a lot of similar pages automatically
ABClf <[email protected]>
| Newsgroups | gmane.comp.web.wiki.pmwiki.user |
|---|---|
| Message-ID | <CACE3LEvsX_5cMTrzsn3KZs9OTFtuOu155Z8U16O8pjTnq+RARQ@mail.gmail.com> |
Eventually, among other possibilities, one strategy for structured data might be something like this, if I say no mistake (to be adapted) : 1/ create one dedicated template page according to your needs for the static part (Data.MyTemplate) with style, css, repetitive text where calls to the dynamic data (the changing part) is made by using page variable and page text variable ; 2/ create 170 data pages, very basic : only data, with page variable and ptv markup (Data.001, Data.002, etc.) (:title My title for Data 001:) (:description This is my description for Data 001:) ptv1: xxx xxx ptv2: ptv3: yyy yyyy ptv4: zzz [[#text1]]Text to be included.[[#text1end]] 2bis/ you may want to use a form for easily filling in your data (or just use an edit template) ; or, if you can generate the data outside pmwiki, import the set of pages. 3/ then, in Data/GroupHeader, ask pmwiki to mix template and data every time (or conditionally) a page is called in Data group : (:include Data.MyTemplate:) This way, every page in Data group will show the data mixed within the template ; you may want to use a special pattern in the url of the data pages, so that it will be easier to have other pages in the same group not using the MyTemplate include, with a conditional like : (:if name [0-9],[0-9][0-9],[0-9][0-9][0-9]:)(:include Data.MyTemplate:)(:ifend:) Gilles. Le sam. 24 juin 2023 à 01:55, Thomas Hirtenlehner <[email protected]> a écrit : > > Hi everyone! > > I've several pages who point to about 20+ other pages each. In total > that's about 170 pages. Those be filled with the same backbone > information, like a picture (that's named exactly like the page) and the > same structure of Title and headings. > > doing this for one page is easy, but I'm dreading having to copy/paste > this another ~170 times. > > Is there a way to create these pages in bulk? > > The only thing I could think of was to put these pages into their own > group and putting the into into the group header, but this of course > only gets applied to pages that already exist (and I'd rather keep these > pages in their original group...) > > Any suggestions are highly appreciated (I'm even grateful about > conformations that this is not possible, that way I at least can sleep > again ^^) > > Thomas > > _______________________________________________ > pmwiki-users mailing list > [email protected] > http://www.pmichaud.com/mailman/listinfo/pmwiki-users _______________________________________________ pmwiki-users mailing list [email protected] http://www.pmichaud.com/mailman/listinfo/pmwiki-users