svn commit: r611243 - /lenya/trunk/src/modules-core/templating/java/src/org/apache/lenya/cms/publication/usecases/CreatePublicationFromTemplate.java

[email protected]
Newsgroups gmane.comp.cms.lenya.cvs
Message-ID <[email protected]>
Author: andreas
Date: Fri Jan 11 09:49:48 2008
New Revision: 611243

URL: http://svn.apache.org/viewvc?rev=611243&view=rev
Log:
Redirect to pub intro page after creating a publication

Modified:
    lenya/trunk/src/modules-core/templating/java/src/org/apache/lenya/cms/publication/usecases/CreatePublicationFromTemplate.java

Modified: lenya/trunk/src/modules-core/templating/java/src/org/apache/lenya/cms/publication/usecases/CreatePublicationFromTemplate.java
URL: http://svn.apache.org/viewvc/lenya/trunk/src/modules-core/templating/java/src/org/apache/lenya/cms/publication/usecases/CreatePublicationFromTemplate.java?rev=611243&r1=611242&r2=611243&view=diff
==============================================================================
--- lenya/trunk/src/modules-core/templating/java/src/org/apache/lenya/cms/publication/usecases/CreatePublicationFromTemplate.java (original)
+++ lenya/trunk/src/modules-core/templating/java/src/org/apache/lenya/cms/publication/usecases/CreatePublicationFromTemplate.java Fri Jan 11 09:49:48 2008
@@ -98,7 +98,7 @@
             instantiator = (Instantiator) selector.select(template.getInstantiatorHint());
 
             instantiator.instantiate(template, getParameterAsString(PUBLICATION_ID), name);
-
+            
         } finally {
             if (selector != null) {
                 if (instantiator != null) {
@@ -108,6 +108,13 @@
             }
         }
 
+    }
+
+    public String getTargetURL(boolean success) {
+        if (success) {
+            return "/" + getParameterAsString(PUBLICATION_ID) + "/introduction.html";
+        }
+        return super.getTargetURL(success);
     }
 
 }
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.