[opencms-dev] Cms.link question

Philip subp at wachtel.us
Wed Jul 28 21:27:01 CEST 2004


Hi again,

I'm actually making a lot of progress today, so I'm happy.  However, with
progress, questions come.

I have some pages that are set to export=false, and some not.  This is on
purpose, of course.  I've rigged my navigation to work, but I'm not sure
it's "best practice".  I find that I'm going to have to do this in other
places as well, like my login script that will take the requestedResource
param and redirect to it.  It'll have to know whether to redirect to a
static or dynamic page.  Here's what I did.  Is this the best way?

if (cms.property("export", nav.getResourceName()) != null &&
    cms.property("export", nav.getResourceName()).equals("false")) {
    href = "/opencms/opencms" + nav.getResourceName();
} else {
    href = cms.link(nav.getResourceName());
}

Thanks for your thought.

Philip





More information about the opencms-dev mailing list