If you currently are not using a PT associated to the Data-type, You will need to write a PT for the solution.
Build your index page using this new PT and not with some custom scripting. In your PT, you can refer to this new DCR which is being read separately from the DCRs in Staging.
You know the rest.
If in case, I have not been understand your issue well, please elaborate
If you currently are not using a PT associated to the Data-type, You will need to write a PT for the solution. Build your index page using this new PT and not with some custom scripting. In your PT, you can refer to this new DCR which is being read separately from the DCRs in Staging. You know the rest. If in case, I have not been understand your issue well, please elaborate
You either did not read Andy's post at all or misunderstood it completely
I implemented the same solution with the above however you can also use custom scripting to accomplish the above. When you dirwalk through your DCRs in staging, also filter the currently editted DCR out.
Bo is right, you did not understand my questionI have 1 index DCR (choose the picture for the index page etc) that reads several hundred other DCRs for more content. The question how to mix using Staging DCRs for more of the data but workarea DCRs for any data currently in the approval process.
I think it's a chicken and egg problem, there is no perfect solution.I've implemented auto index-generation in several projects, for what it's worth here is the gistof the (evolved) approach. Sure, it's a compromise. I use PR below as a Type metaphor, could be anything.1. PR has two presentations, let's say pr.pt and pr_index.pt. Only pr.pt is registered in templating.pr_index does not have a dedicated DCR.2. Submission Event is intercepted. Event Handler checks Files and if PR is in the list starts PR Index generation in asynch mode.3. Index Generation script uses iwpt_compile with DCRs from STAGING and pr_index.pt. Output Files are generated into dedicated zz_ WA created exclusively for various auto-generations. Upon successfully generation assets are submitted (There is a caveat here! Submission gets intercepted. So, if my "zz_..." Workarea is the event source, Handler should ignore it). Upon submission, iwupdate is used to get new assets to *regular* workareas.My compromise here is that non-approved PRs are not indexed.
I think it's a chicken and egg problem, there is no perfect solution.
I've implemented auto index-generation in several projects, for what it's worth here is the gistof the (evolved) approach. Sure, it's a compromise. I use PR below as a Type metaphor, could be anything.1. PR has two presentations, let's say pr.pt and pr_index.pt. Only pr.pt is registered in templating.pr_index does not have a dedicated DCR ( Or rather, all of them are ) 2. Submission Event is intercepted. Event Handler checks Files and if PR *Pages* are in the list starts PR Index generation in asynch mode.3. Index Generation script uses iwpt_compile with DCRs from STAGING and pr_index.pt. Output Files are generated into dedicated zz_<something> WA created exclusively for various auto-generations. Upon successfully generation assets are submitted (There is a caveat here! Submission gets intercepted. So, if my "zz_..." Workarea is the event source, Handler should ignore it). Upon submission, iwupdate is used to get new assets to *regular* workareas.My compromise here is that non-approved PRs are not indexed.
ISCBorisB - this is the same thing, I proposed initially. Were you poitning to something else? As far as approvals are concerned, this will be a mix of User Training and Technical Design as I proposed in my previous post
Ah... Now I understand... >>Build your index page using this new PT and not with some custom scripting.>>In your PT, you can refer to this new DCR which is being read separately from the DCRs in StagingIt's absolutely same solution, sure... Please note though that my solution is ALL custom scripting. PT there is superficial and kept only for consistency and support.I might just as well have parsed DCRs in "index genreration" Script and output the result. There is no "index DCR" whatever, new or otherwise etc...But, sure, it's absolutely same solution
The downside is that the reviewer does not see the changes in theindex page during the review process.
Here is second approach - get the stuff approved with an index page which is built from all the DCRs in Staging + the DCR in the current workflow.Do a second generate of the index page, after the approval and Submission to IWOV Stage. This time with only the DCRs from Staging.
The idea of, when I run iwpt_compile, it looks for the job ID that the index DCR is attached to, and uses workarea DCRs for those and staging for the rest, is where I am leaning. Is there any way to pass a variable through iwpt_compile ? I see the tag specific args, can I use those to pass something i may need ?
So reading perldoc teamsite:t::iw_pt I can pass user defined variables to the PT.So my plan is, in the generateHTML step of my WF, run iwpt_compile of my index page with something like thisiwpt_compile -pt pt -iw_pt-arg arg1="DCR1" arg2="DCR2" and collect that information with {iw_value name="$iw_value{arg1}"/}That will be my list of files to use the WA version, the others will be Staging.
So I have a separate index DCR. It also reads a whole lot more detail DCRs. The index DCR defines keywords, images, intro etc on the index page. So I run iwpt_compile on the index which reads 1000 other DCRs. Net result is that the index PT does not know which of the 1000 other detail DCRs were attached to the same job as the index (and thus should use the WA not Stage version) I plan to pass the list of details DCRs with the arg string.I hope that is more clear, though, after reading it, I can say it is probably not. What can I say, there is a reason I am a geek.
Perhaps, but why arg? Why not standard iw_pt-dcr? ( Other than geek-ness of course
I see what you mean, so I could pass the index and the other DCRs at the same time in iw_pt-dcr. I think that might be a bit more confusing, not that any of this is truly clean. The other advantage is this gets added at the end, since my generateHTML script uses 1 iwpt_compile for 30 different template type, I can just set another variable and leave it blank at the end.Either would probably work.Andy
Ahh, sure... If that's a changable part of 30+ calls it makes sense to keep it segregated. Btw, I try not to pass too many DCRs but rather use 'iwpt_load_dcr' within multi-DCR PT. The reason is that the maximum command length is not that great (8100 something on Windows)