Sitewide constants / variables

Can I somehow define constants like
SiteName = "Company XYZ"
and then put in page titles expressions like
SiteName + " - Welcome"
- or -
SiteName + " - Pricelist"
etc? It seems strange to me that such a mighty tool like
Dreamweaver would force designers to change maybe hundreds of page
names manually when the company name changes...

> Actually, I was investigating this before. Pity that
template parameters
> can
> only be used within the BODY tag... :-(
You can use a Template Parameter anywhere within the body of
the page, not
just within the <body> tag. The only restriction is
that it cannot be used
within an editable region.
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.projectseven.com/go
- DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs,
Tutorials & Resources
==================
"Powermonger" <[email protected]> wrote in
message
news:g3d9m6$eul$[email protected]..
> Thanks for your input, Alan.
>
> >Is this one company, and you want to change the
name?
> >Or is it one set of page designs, and you want to be
able to quickly
> >change
> >the company name to adapt the pages for use by a
different company on
> >different web site?
>
> I discuss this feature here in general - it may be
useful in various
> site-wide
> situations, e.g. changing company name, copyright text -
just about every
> text
> which appears on many pages.
>
> >There is a clumsy way to do it with Editable
attributes, and you have to
> >monkey with the code. AND the Editable attributes
are page specific, you
> >would still have to do a find and replace sitewide
to change the value of
> >the attribute.
>
> Actually, I was investigating this before. Pity that
template parameters
> can
> only be used within the BODY tag... :-(
> But yes, this is the closest mechanism which DW has.
>

Similar Messages

  • Creating a Package for Constant Variables

    Hi
    I expect this should be an easy question for some of you, but I am fairly new to PL/SQL!
    Anyhow, I would like to create an PL/SQL Script as a package, which holds a list of Constant Variables, which will be common across a number of PL/SQL Packages rather than having to repeat the constants again and again over a number of files and then having the worry of trying to maintain them all.
    Can someone please advise me how to create such a package?
    Thanks

    You can create the package this way:
    create or replace package myconst is
    const1 number := 0;
    const2 number := 2;
    end;
    /And you can optionally initialize your constants this way:
    create table myconstTable  (c1 number, c2 number);
    insert into myconstTable values (1,2);
    create or replace package body myconst is
    begin
      Select c1,c2
        into const1,const2
        from myConstTable;
    end;
    /And finally you can use it this way:
    set serverout on
    exec dbms_output.put_line(myconst.const1);
    1Max
    [My Italian Oracle blog|http://oracleitalia.wordpress.com/2009/12/18/table-elimination-oppure-join-elimination-lottimizzatore-si-libera-della-zavorra/]

  • Constant variable in control file - sqlldr

    Hi all,
    Is there a way to create a dynamic constant variable within the control file?
    I'm trying to load from a csv file but need just 2 values from the 1st row, as a constant for the inserts for the rest of the rows.
    How/can I use a variable and assign this value to it and use that variable inside the control file?
    For example: (first character: 1=header, 2=content)
    .csv file:
    1,constant1,constant2
    2,data11,data12
    2,data21,data22
    2,data31,data32
    2,data41,data42
    table:
    col1 col2 col3 col4
    data11 data12 constant1 constant2
    data21 data22 constant1 constant2
    data31 data32 constant1 constant2
    data41 data42 constant1 constant2
    Thank you soo much for your help
    Edited by: user9215527 on Nov 15, 2011 8:08 PM
    Edited by: user9215527 on Nov 15, 2011 8:11 PM
    Edited by: user9215527 on Nov 17, 2011 9:48 AM

    I am thinking about the following:
    1. Load the data into 2 separate tables (header and content)
    2. Update the content with the constant value from header.
    Question:
    Is there any other better way that I can do? Like can those 2 steps be done in a single control file?
    Pls help.
    ====================================================
    Step 1:
    load data
    infile 'test.txt'
    append
    into table zz_test_hdr
    when (1:1) = '1'
    ( constant_1 POSITION(2:12) ,
    constant_2 POSITION(13:23))
    into table zz_test
    when (1:1) = '2'
    ( col_1 POSITION(2:11),
    col_2 POSITION(12:22))
    Step 2:
    update zz_test
    set (col_3, col_4) = (select constant_1,constant_2 from zz_test_hdr);
    =============================================

  • How can I hide constant variable value in class file?

    hi,everybody.
    I am having a problem with constant variable which define connectted with database(URL,username,password).
    when I used UltraEdit to open class file, I can see constant variable value.
    Thanks!

    OK, let's see. Firstly, if I may correct your terminology, the phrase "constant variable" is a paradox (I think that is the right word). You have either one of the other. You declaration is either 'constant' or 'variable' (ie: it can change at run-time or it doesn't). People often use the term 'variable' and 'declaration' interchangably which is where the confusion lies.
    Anyway, onto the real problem. It seems that you want to protect your connection details (in particular the password, I would guess). Unfortunately, Java compiles not to machine-code, but byte-code which is semi-human-readable. So people, if they are inquisitive enough, will always be able to see it if they try hard enough.
    You can do one of two things:
    (1) Get an 'obfusticator'. An obfusticator is something that you run over Java source files and it completely messes it up (without modifying functionality). You then compile and the original source is such gibberish that the byte-code is very difficult to understand. However, the password will still be in there somewhere.
    (2) Don't put sensitive information into your source. Have this kind of info in external files (encrypted) and allow your class to read this file, decrypt, and use it.
    Hope that helps.
    Ben

  • Question about using constant variables in Forms

    As I am still very new to Forms, please forgive my ignorance if the answer to my question is very simple. I am trying to figure out how to use constant variables within my Forms application. For example, if I want to setup return code constants for the application (mind me, these are examples):
    RC_SUCCESS CONSTANT PLS_INTEGER := 1;
    RC_FAILURE CONSTANT PLS_INTEGER := 0;
    RC_YEAR_DATA_NOT_FOUND := 50;
    Then in a module I created, if I wanted to check the return code against one of the constants I would do:
    DECLARE
    rc PLS_INTEGER;
    BEGIN
    GET_YEAR_DATA('2000', rc);
    IF rc = RC_YEAR_DATA_NOT_FOUND THEN
    -- Do some error handling
    END IF;
    END;
    I know that you can declare constants within individual procedures or packages but I can't see to find information on how to do this globally for the application. I've read about using global variables within Forms but the CHAR data type only and the fact the value can be changed doesn't really fit for this purpose. Am I missing something? Is there a config file or something for the webserver that can be used to set these up??
    Any help would be appreciated.
    Thanks

    To declare constants create a Package-Specification in a pll and deifne all your constants there, something like:
    PACKAGE PK_CONSTANTS IS
      RC_SUCCESS CONSTANT PLS_INTEGER := 1;
      RC_FAILURE CONSTANT PLS_INTEGER := 0;
      RC_YEAR_DATA_NOT_FOUND := 50;
    END;Then attach that pll to all your forms-modules, and use it like
    IF rc = PK_CONSTANTS.RC_YEAR_DATA_NOT_FOUND THEN
    END IF;A word about exceptions or errors: In my eyes its clearer (and in case of exceptions even better) to raise an exception than to hide it behind return-codes.

  • Global Constants / Variable in OSB

    I want to define global Constants / Variable in OSB and I want to access them in XSLT when I am tranforming the requests...
    Any idea how can I do that?
    I want to use these variables and constants for server name and ports (in different environment) and some other stuff.

    We have done a similar implementation for the same scenario. We have created a Xquery where we put in the configuration information as an XML and then in the pipeline stages we use the Assign the Xquery to a a temporary variable and then use the values of the xml using relative xpath expressions.
    This way any time we need to make any changes to the confguration we know once place we can change and it gets reflected in the complete code base.
    Below is how we have done it:
    - create a Xquery with xml configurations (say commonconfig.xq)
    - then using the Assign action get the output of this xquery into a temp var (say commonConfig)
    - then use the configurable values using the relative xpath in the Assign action (say Assign $commonConfig/param1/text() to param1Value
    Let me know if you need further information.
    Thanks,
    Patrick

  • How to create a constant variable(or presentation variable) inside request

    hi i have a prompt with from_month and to_month(both i have declared as presentation variable)
    i need transactions of from_month to be saved as presentation variable say from_data and use it for further processing.
    I tried the below one
    created one more prompt with column function as 'filter transactions using from_month' and saved it as from_data presentation variable.
    but i do not know how to hide the second prompt from dashboard.
    Please help.

    Hi,
    try like this. this is a working solution.
    in your report add a field with below formula. Remember you need month_id not month_name i.e. a no. needs to be passed. this will give you the value of the month you selected in your prompt in all the rows.
    RSUM(case when Calendar_Month = @{Month_ID}{201212} then tot_txn end)
    in your variance use like
    tot_txn - RSUM(case when Calendar_Month = @{Month_ID}{201201} then tot_txn end)/ tot_txn
    create a filter like month_id>= @{Month_ID}{201201}

  • Defining more then one constant variable to a value

    Is there a way to define more then one value or a wildcard to a variable declaration:
    <p>
    "variable name" := Varchar2 (##) := UPPER ('text') || '<b>value</b>'
    <p>
    I want the value to be more then one value, don't think I can use select....like here,
    Any ideas?
    Message was edited by:
    user452863

    Hi,
    SQL> create or replace procedure tt (invar1 in varchar2, invar2 in varchar2)
      2  as
      3  var varchar2(10):=upper(invar1)||','||upper(invar2);
      4  begin
      5  dbms_output.put_line(var);
      6  end;
      7  /
    Procedure created.
    SQL> exec tt('titi','toto');
    TITI,TOTO
    PL/SQL procedure successfully completed.
    SQL> Is it do you want ?
    Nicolas.

  • What is the difference between Constant Window, Variable Window,Main Window

    hello all
    what is the difference between 1) Constant Window
                                                2) Variable Window
                                                3) Main Window   in SAP SCRIPT

    Hi,
    Window Types
    When defining a form window, you must select a window type for the window.
    You can choose between three types:
    Constant Windows (CONST)
    Variable Windows (VAR)
    Main Windows (MAIN)
    Constant Windows (CONST)
    Starting with Release 4.0, the system internally processes windows of type CONST similar to windows of type VAR.
    Therefore, if you create a new window, always use type VAR.
    Variable Windows (VAR) 
    The contents of variable windows is processed again for each page, on which the window appears.
    The system outputs only as much text as fits into the window. Text exceeding the window size is truncated;
    the system does not trigger a page break. Unlike constant windows, the page windows declared as variable windows may have different sizes on different form pages.
    As far as the processing of the window contents is concerned, the system currently treats constant and variable windows alike.
    The only difference is that constant windows have the same size throughout the form.
    Main Windows (MAIN) 
    Each form must have one window of type MAIN. Such a window is called the main window of the form.
    For SAPscript forms, the main window has a central meaning:
    It controls the page break.
    It contains the text body that may cover several pages.
    It allows to fix text elements at the upper and lower margins of the allocated page window (for example, for column headings).
    As soon as a window of type MAIN is full, SAPscript automatically triggers a page break and continues to
    output the remaining text in the main window of the subsequent page. Page windows of type MAIN have the same width throughout the form.
    The SAPscript composer thus avoids reformatting of the text after each page break.
    If a page does not have a main window, the system implicitly processes all other windows of the page and continues with the subsequent page.
    This page must not call itself as subsequent page (recursive call), since this would produce an endless loop.
    In such a case, SAPscript terminates the output after three subsequent pages.
    For printing header lines or totals, the different output areas of the main window are of special importance.
    go through this links:
    In Scripts Variable window and constant wind difference?
    Main Window
    Re: Main Window in SAP Script
    What is the difference between Constant window and variable window?
    Regards
    Adil

  • Constant expression required

    (Original thread http://forum.java.sun.com/thread.jsp?forum=31&thread=428634)
    Hello all,
    in the following class, if the comment is removed, the compiler complains that a constant expression is required.
    class Test {
    final static int A;
    final static int B=5;
    static {
    A=5;
    public static void main(String args[]) {
    switch(1) {
    //case A:
    case B:
    Is this a bug? Is this a feature? How could A not be a constant expression?
    Is it good coding style to initialize constant variables at declaration time and not in the static block?
    7Kami

    (Original thread
    http://forum.java.sun.com/thread.jsp?forum=31&thread=42
    634)
    Hello all,
    in the following class, if the comment is removed, the
    compiler complains that a constant expression is
    required.
    class Test {
    final static int A;
    final static int B=5;
    static {
    A=5;
    public static void main(String args[]) {
    switch(1) {
    //case A:
    case B:
    Is this a bug? Is this a feature? How could A not be a
    constant expression?JLS goes to a lot of detail explaining why this is a language feature. It is required to support Java's requirement to never have unreachable code. In order to do that, the compiler need to have compile-time const expressions in case labels (otherwise it can never detect at static compilation time whether a case branch is reachable or not [e.g., because it clashes with another case label]). Those expressions could be either literals or static finals etc.
    This, BTW, explains why inlining of static finals is not just an optimization but an essential language requirement.
    The relevant JLS sections to read are 14.20 and 13.4.8.

  • Using variables in script logic.

    Hi,
    I still haven't figured out how to assign a userdefined variable in a script.
    My case is that I in my script commits data several times, after every commit I need to do a new *XDIM_MEMBERSET. Every time the *xdim_memberset is exactly the same.
    Example - what I do now.
    *XDIM_MEMBERSET ACCOUNT="REVENUE"
    *XDIM_MEMBERSET VERSION="90"
    *rec
    *commit
    *XDIM_MEMBERSET ACCOUNT="REVENUE"
    *XDIM_MEMBERSET VERSION="90"
    *rec
    *commit
    Etc.
    It would be much easier, if I the beginning of each script for Account and Version defined a variable, and then having every *xdim_memberset use the variable. Then I only need to change the definition of the variable in the beginning of each script.
    Example - what I want to achieve.
    //Definition of constant variables.
    %ACCOUNT_VARIABLE%= "ACCOUNT = REVENUE"
    %VERSION__VARIABLE% = "VERSION=90"
    *XDIM_MEMBERSET %ACCOUNT_VARIABLE%
    *XDIM_MEMBERSET VERSION=%VERSION__VARIABLE%
    *rec
    *commit
    *XDIM_MEMBERSET %ACCOUNT_VARIABLE%
    +*XDIM_MEMBERSET VERSION=%VERSION__VARIABLE%
    *rec
    *commit
    I've looked at the *SELECT and *MEMBERSET - but can't really get the syntax to work.....
    Thank you,
    Joergen
    Edited by: Jørgen Dalby Andersen on Dec 30, 2011 7:58 AM

    Hi,
    when I use *XDIM_MEMBERSET ACCOUNT AS %TEST% = BAS(REVENUE) - it work fine.
    BUT ! after my first commit, it seems like the variable value is lost. And the *Xdim_memberset takes all.....
    Fortunately enough, *select still contains the variable value after *commit.
    Thanks,
    Joergen
    *Correction !
    It actually works, it still contains the variable value after commit !!
    Edited by: Jørgen Dalby Andersen on Dec 30, 2011 1:33 PM

  • SQL Loader - Set a field to a CONSTANT and the data is date

    Hi.
    I have a question on SQL Loader.
    I want to load a field(field name is TIME_IN).
    In the Oracle table, this field type is DATE.
    I my csv file, I do not put any value for this field.
    I intend to use CONSTANT variable to this field.
    In my control file, following is the command for above field.
    Hoever, when I run the SQLLoader, it will return me error message which is INVALID MONTH.
    I hope somebody can help and advise me on this matter.
    Thanks.
    INTO TABLE eqreceival_temp
    FIELDS TERMINATED BY "," OPTIONALLY ENCLOSED BY '"'     
    EQ_NO,
    SIZE_TYPE,
    CUSTOMER,
    CONSTRUCTION,
    QUALITY,
    CONDITION,
    DATE_IN DATE "DD/MM/YYYY",
    TIME_IN CONSTANT '01/01/1999',
    PARK_LOC CONSTANT 'CP',
    STOCK CONSTANT 'S',
    DISCHARGE_PORT CONSTANT 'MYPEN',
    CTYPE CONSTANT 'P',
    ROAD CONSTANT 'Y',
    GATE CONSTANT 'Y',
    SHIPMENT CONSTANT 'Y'
    )

    use to_data function when u r inserting....
    or
    give simply SYSDATE --- AND FIRST CHECK
    --YOU MAY REMOVE CONSTANT KEY WORD.                                                                                                                                                                                                                                                           

  • How to reference a Constants.as actionscript in another actionscript class

    Hi,
    How can I use constant variables from a Constatnst file (.as file) in another actionscript class?
    Thanks.

    What id I don't have the Constants.as not defined as a class.
    Constants.as
    public static const BASE_NAME = "ABC";
    public static const EQUIPMENT_NAME = "777";
    I can't import is file as its not a class file, right?
    So, how can I access BASE_NAME, etc.
    In a mxml file, I use the <mx:Script source="/../Constants.as"/>
    but how about in an actionscript class file.

  • I want to use a variable in set_block_property

    i m trying to SET insert_allowed,update_allowed property of database at form level.
    SET_BLOCK_PROPERTY(ARG_TBL_NAME,UPDATE_ALLOWED,PROPERTY_TRUE);
    Its working fine with above syntax but i want to do like this can I?
    SET_BLOCK_PROPERTY(ARG_TBL_NAME,UPDATE_ALLOWED,X);
    -- WHERE X IS ANY VARIABLE WHICH CONTAIN VALUES EITHER PROPERTY_TRUE OR PROPERTY_FALSE.
    WHEN I TRIED THIS MY FORM COMPLIED BUT AT RUN TIME WHEN IT COMES THIS STATEMENT IT JUST SIMPLY CLOSED. REMBER I M USING FORM 6I

    Ok, here's the deal. PROPERTY_TRUE and PROPERTY_FALSE are Forms NUMERIC Constant variables. The numeric value for these variables are:
    PROPERTY_TRUE = 4
    PROPERTY_FALSE = 5
    You can find the value of almost all Forms Constant variables by simply outputting them to the message console using the Message() built-in, eg; Message(PROPERTY_TRUE);
    If you want to make this parameter to Set_Block_Property more dynamic, then I would make "X" a numeric variable and where ever you are assigning "X" a value either assign it the literal value or use the Forms variable. For example:
    BEGIN
       IF ( SOME CONDITION is TRUE ) THEN
          X := 4;
       ELSE
          X := 5;
       END IF;
    END;Or you can use the following:
    BEGIN
       IF ( SOME CONDITION is TRUE ) THEN
          X := PROPERTY_TRUE;
       ELSE
          X := PROPERTY_FALSE;
       END IF;
    END;Craig B-)
    If someone's response is helpful or correct, please mark it accordingly.

  • Dynamic variable in template

    I would like to have variable which changes value for each po.
    Actually controlling po lines for each page, I have restricted to 5 as constant variable. But even though sometimes due to long description, line text, short text for po line which are variable may go over the page.
    I'm trying to count for each line with long description, short text, long text and getting the count into variable.
    This count i'm able to display value on the template as element tag.
    I want to know how do i pass this element tag for the variable which is constant now as 5?
    I even tried to display as parameter but nothing working out.
    This is little bit urgent.can somebody help me on this.
    Thanks,
    MK

    Hi Srini,
    This is declaration of variable you showed to me in template
    <xsl:variable name="no_of_lines_per_page" select="/LINE_COUNT/LIST_G_C_COMPANY/G_C_COMPANY/LIST_G_PO/G_PO/LIST_G_LINE_NUM/G_LINE_NUM/CF_LINE_CT"/>
    This declaration will be constant and running with constant value of 5 lines per page for the whole report.
    When i changed to assign variable with element tag as:
    <?xdoxslt:set_variable($_XDOCTX,'no_of_lines_per_page',/LINE_COUNT/LIST_G_C_COMPANY/G_C_COMPANY/LIST_G_PO/G_PO/LIST_G_LINE_NUM/G_LINE_NUM/CF_LINE_CT)?>
    I tried to run the above changes i'm getting error.I would like the variable to update the count for each page.
    With variables, can i fetch this result? or do you think any other ways?
    Can you help what is wrong here?
    Thanks
    Message was edited by:
    user616860

Maybe you are looking for

  • Mail SMTP (outgoing) does not work after Yosemite upgrade

    I have just updated Yosemite on my Mac and MacBook Air and the outgoing mails cannot be sent - the SMTP-connection fails. It worked fully Ok few seconds before the upgrade was started. So, I wonder if anyone or Apple can help on getting the Outgoing

  • Direct to field mapping to a foreign column

    I am using toplink workbench to map an attribute to a column in a foriegn table. Example: Table Emp { EmpID, AddressID, -- (Foriegn Key to the table Address) StreetName } Table Address { AddressID, (Primary Key) StreetName } Class Emp{ empId; address

  • Set document root for Tomcat

    Hello I want Tomcat to use another document root (where index.html typically resides in). I set <Host name="localhost" debug="0" appBase="" docBase="d:\WWW" unpackWARs="true"> but I got error MAPPING configuration error for request URI Unfortunately,

  • Deleting HU's from delivery

    Hi, I have to delete HU's from a delivery. I need to delete all of them except a couple. I found this link in SDN Re: Delete handling unit have been trying to implement this but everytime I get a short dump saying 'Runtime error CSSQL_ARRAY_INSERT_DU

  • Backup Copy "Don't Have Write Access for your iTunes Media Folder"

    Subject states the case. Here is what changed. I run a Mac Mini with an external hard drive with about 200gb of music (HD-1). I have a second external HD that I use to periodically back up with Time Machine (HD-2). HD-1 crashed so I bought a new driv