Solved

Tcl/CMS command to tell whether I'm currently on the dev or live site?

Posted on 2002-06-11
3
218 Views
Last Modified: 2010-03-17
Can I with a Tcl command tell whether I'm on the development or the live site?

// Anders
0
Comment
Question by:Ruskin
3 Comments
 

Accepted Solution

by:
davemas earned 100 total points
ID: 7076630
Certainly you can, just use [SHOW PM_HOST] and
[SHOW PM_PORT] and this will give you the CDS host:port
information you want, and from them you can know if its the Live CDS or the development CDS .  

Another way is to declare a local
var in your delivery.tcl with the host and port of your CDS but this is not necessary as Vignette provides you the same information:

If the two CDS are on diferent machines:

on the delivery.tcl from the Live CDS :  
  SET PORT_LIVE 83
  SET HOST_LIVE 140.25.52.21  

on the delivery.tcl from the Live CDS :  
  SET PORT_DEV 81
  SET HOST_DEV 140.25.52.22  

if the two CDS are on the same machine :
  SET PORT_LIVE 83
  SET PORT_DEV 81
  SET HOST_CDS 140.25.52.21  

0
 

Author Comment

by:Ruskin
ID: 7077678
Thanks Davemas!

Regards
// Anders
0
 
LVL 2

Expert Comment

by:memerot
ID: 9069271
You probably want to put this in a library, and in that library set any variables that are box specific.  Then include that library in all the pages that reference the box name for generating links, etc.  I used to use HTTP_HOST and HTTP_SERVER_NAME mostly.
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Meet the world's only “Transparent Cloud™” from Superb Internet Corporation. Now, you can experience firsthand a cloud platform that consistently outperforms Amazon Web Services (AWS), IBM’s Softlayer, and Microsoft’s Azure when it comes to CPU and …
ADCs have gained traction within the last decade, largely due to increased demand for legacy load balancing appliances to handle more advanced application delivery requirements and improve application performance.

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question