Zum Hauptinhalt gehen

PathLookup

Kommentare

4 Kommentare

  • Zendesk API User
    Author: broszeit - 10/24/2013 10:14

    Hi

    an url is created during the generation. So you can get the url in FirstSpirit 4.2R4 only during the generation.

    The easiest way is to create a page which references all the needed PageRefs and stores their urls in xml for example.

    But if it is important to get the urls in Java-code, you could use a script in the template by using CMS_RENDER. This script will run in the GenerationScriptContext which enables you to get the UrlCreatorProvider used by the ContentProducer#getUrl(...) method.

    Regards

    Rouven

    0
  • Zendesk API User
    Author: blaka - 10/29/2013 6:06

    Hi,

    The UrlCreator I have seen now. But I have a challenge as I call a workflow from data sources in Java and then a schedule entry for generation. So we need to find out how we can reach the GenerationScriptContext in this context instead of the WorkflowScriptContext.

    Thank you.

    0
  • Zendesk API User
    Author: broszeit - 10/29/2013 8:48

    Hi

    int the ScheduleContext the UrlCreator is stored in a property. This property is only set if a generate task was performed before the script-execution.

    Afterwards you can receive the UrlCreator with this code: (source: https://community.e-spirit.com/message/11438#11438 )

    context.getProperty(GenerateTaskExecutor.CONTEXT_KEY_URLCREATOR);

    Regards

    Rouven

    0
  • Zendesk API User
    Author: blaka - 11/1/2013 6:48

    Thanks, I will try this :smileygrin:

    0

Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.