Hi I have a requirement wherein I have to generate 5 JSPs using one TPL since the generated 5 pages have some similarity.Now to work on the above requirement, I created a TPL and clubbed two JSPs in the following way:[HTML]if (page_title ="test1"){// generate HTML 1}elseif (page_title ="test2"){// generate HTML 2}The if and else blocks used were interwoven tags, its just the pseudocode I am writing here[/HTML]The above process is working now for 2 html pages, but the TPL is getting uploaded with extra if,else blocks and 90% code is repeating inside each blocks.Please suggest if there is some other way.
Hi I have a requirement wherein I have to generate 5 JSPs using one TPL since the generated 5 pages have some similarity.Now to work on the above requirement, I created a TPL and clubbed two JSPs in the following way:[...]The above process is working now for 2 html pages, but the TPL is getting uploaded with extra if,else blocks and 90% code is repeating inside each blocks.Please suggest if there is some other way.
Are you intending to process a single DCR with a single PT and produce five output files - or are you intending that a single PT processes N different DCRs (of the same type?) that, based upon some value within the DCR could produce any one of five possible output files?In either case - if you want to reduce the amount of redundant coding in your PT - I'd recommend writing a bunch, perhaps all, of the PT in Perl so you can create subroutines and/or use modules to provide for code re-use.