Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
Index pages - HowTO ?
ziggy1
I guess this has been discussed over and over again in this forum, but still I am not quite sure how to generate index pages "the right way".
I have been working on our news template for a while now and I am not happy with how long it has taken to do this and I am not even sure if I am on the right track.
This is the way I am doing it:
I have one news template /templatedata/intranet/news which has one presentation template.
then I have another presentation template just for the new index page. "news_index.tpl".
I want to enforce the naming of the generated HTML pages, so that they have the same name as the DCR's (plus .html)
I haven´t done this yet, but was thinking of doing that in the external task I use to generate the index_page.
I try to accomplish this in a workflow. There I have an external task that runs iwpt_compile on the news_index.tpl file.
The news_index.tpl file reads through the DCR's and lists all the DCR´s and makes a hyperlink to the generated html page in the news folder, even if the html page doesn't exist, so that is one problem I´m having but will be solved as soon as I complete the html generate part.
After I´ve done this I was thinking about adding the generated html page to the workflow along with the regenerated news_index page and submitting all these files (and perhaps even deploy them).
The question I've got is, am I going the far way around this or does it really have to be this complicated to create and maintain a simple page that holds the index of some news, articles or whatever. It just seems alot of work to do such a simple thing !
I have been trying to find examples of this or any suggestions in the manuals and material from Interwoven but it hasn´t helped me alot.
Any comment would be appreciated.
//Ziggy
Find more posts tagged with
Comments
Migrateduser
I have done exactly the same thing.
I had thought of following problems with this approach:
1. If someone creates test DCR - which really should not be deployed. And hence html for this will not be generated. But you will still be adding the entry for this in index page.
2. You have to force user to name the DCR and HTML the same.
3. You need to hardcode the path where DCR resides. So you can not rename the folder without having to change PT.
I am hoping someone in this forum can suggest a better idea of doing this.
Regards,
Ravindra
Adam Stoller
Just some random thoughts, as I haven't had to actually implement any of this as of yet....
FormAPI
(TeamSite Templating 5.5.2) allows you to specify the name for the DCR programmatically within the DCT (generally based on fields that have been filled in plus perhaps date or user information or some such).
The presentation template can use the
iw_ostream
tag to specify a particular name for an output file. This can be based on the name of the input (DCR) file using such things as
iwpt_get_dcr_name()
.
Between the two ideas above, you should be able to reasonably control both the DCR and generated page names (and locations).
For indexing - there's a brief
Tech Note (48826)
which essentially refers to the
tutorials
you can find on the support site.
Hope that helps,
--fish
(Interwoven Senior Technical Consultant)
ziggy1
Thank you for your comment.
I have already implemented the name enforcement in FormAPI and just use the current data + some info as the filename. But the downside to FormAPI is that it only works for IE5.5 (perhaps IE6 as I read from some other forum). It works fine for me but I might have some problems explaining to all the users that they need to have IE5.5.
I am not familiar with the iw_ostream tag, but I will have to look at that.
Is that something I put inside the presentation template I am using to generate the News HTML itself or something I put in the index presentation template to generate all the the pages in the directory?
Perhaps I can find some examples on how this is used, I´ll look in the examples folder...
//Ziggy
Migrateduser
It's possible you might find a dynamic approach to be more suitable. Ie, you could create a server-side .jsp or .asp file for the index page, which, each time accessed, scans the directory its detail files are stored in and constructs a link to each page, using the page's <title> as the <A> text and the file path as the href.
I've done this a few times in .asp--see attached for example.
bw
Bob Walden [bob.walden@interwoven.com]
Interwoven Education Group
IM: Yahoo, MSN bob_walden
duartecordeiro
What I've done:
1. If someone creates test DCR - which really should not be deployed. And hence html for this will not be generated. But you will still be adding the entry for this in index page.
our workflow submits files for the staging and after that creates the index file based on the staging filelist.
So, you just:
- run a worflow for dcr 1
- preprocess
- submit dcr 1 to staging
- postprocess:
- generate page with a TPL
- generate index page with a TPL based on staging
- submit new files (record and index) to staging
2. You have to force user to name the DCR and HTML the same.
if you use the previous workflow, users don't generate files, so the naming convenction on html files is up to you to define.
So, its easy to guess what is the html filename based on a dcr. (we have a hidden field in the dcr that stores a ID that is used to generate the HTML filename)
3. You need to hardcode the path where DCR resides. So you can not rename the folder without having to change PT.
err.. if your index tpl runs through "XPTO" DCT.. the DCRs will always reside on templatedata/soemthing/XPTO/data...
no?
--
Duarte Cordeiro
Neoris Pootugal