Template Substitutions
I've just hit the problem described in this thread:
Vertical right-hand tabs
regarding #TAB_CELLS# substitution being made only before #BOX_BODY#.
Did this turn out to be by design or is it an issue?
I've been interested in several threads relating to template substitutions, which spark the following questions:
Are all of the restrictions on which substitutions are supported "by design"?
Are they for underlying technical reasons or following more abitrary reasoning?
Are these restrictions likely to be changed in future releases?
I'm particularly interested in: #TAB_CELLS# not being restricted by #BOX_BODY# placement; #TITLE# being available anywhere in the page; #PAGINATION# etc "Before Rows" to allow pagination controls in <thead>/<tfoot> elements.
Hello,
It's designed that way, since 99% of the time that's how it's used.
If you are trying to place content regions above tabs I suggest you use one of the #REGION_POSITION_NN# substitutions.
Regards,
Carl
blog : http://carlback.blogspot.com/
apex examples : http://apex.oracle.com/pls/otn/f?p=11933:5
Similar Messages
-
User interface template substitution tags problem
Portal 9.0.2.0.3 (Upgraded from 9.0.2.2.14A)
Hi all,
I am designing an unstructured user interface for use with my portal reports.
I have located a help document called 'Unstructured user interface template substitution tags' from the standard portal help pages.
My problem is that only a few of these tags are actually being substituted for their correct values when I run my reports. For example the help document says the #PAGE.CUSTOMIZEPAGE# tag should be substituted with HTML text hyperlink to the customize page dialog. On my report this tag and the majority of others are substituted with a blank line.
Any ideas?Same problem exists with the #TITLE# tag. However, SOMETIMES (I don't know how or why) the tag shows up. If I find out what the secret is, I'll let you know.
Anyone else have any input?
Pat Murray -
Unstructured user interface template substitution tags
Does anyone know where I can find a full list of substitution tags. An example of the tags I am talking about would be #BODY#
Click on the help link in Portal and search on:
template substitution tags
The link should provide you with a table of all supported #tags#.
Thanks,
Candace -
Report template substitution strings? (APEX 2.2.0)
Hi all,
I am trying to customize a report template. I would like to know if there is a way to get the sort link that goes into the column headers. The next page and previous page links have the #LINK# substitution string. #COLUMN_HEADER# doesn't give me enough flexibility.
Would I have to use a named column template for this? (I don't have much idea what that is. I read about it on Scott Spendolini's blog entry on "Click in a Row".)
Cheers!Hello,
>> I could using JavaScript rewrite the column header to be what I want after the page renders, but I'd rather it show up the way I want in the first place
Can you be more specific about what is it that you want? The report engine allows you to use custom headings. Can’t that feature help you achieve what you want?
>> Is there a list of the substitutions strings that are available to the column header?
The substitution strings you see on the templates populated by the APEX engine with snippets of code you can’t control. You can define your own substitution strings, in the application definition page (under shared components), set them with the code you need, and use them throughout the application, including in templates. The way to use them is a bit different – instead of the “#STRING# syntax, you need to use the “&STRING.” Syntax.
Regards,
Arie. -
UI Template Substitution tags in a procedure
Version: 10.1.4
Is it possible to use Substitution tags in a procedure and call the procedure with in the UI template?
So the UI template will be:
<ORACLE>
BEGIN
Schema.procedureName;
END;
</ORACLE>
The procedure will be:
PROCEDURE procedureName as
BEGIN
htp.p('#USER.FULLNAME#');
END;
This way all the logic can be built in the procedure (taking advantage of the Substitution tags).
When I tried the above the Substitution tag is not rendered as it supposed to (display the User Full Name), but just displays it as raw HTML.
Is it possible/viable to use Substitution tags outside UI Templates?
Thanks.The specific example you are asking about could also be implemented without substitution tags. The following is from a pl/sql item I added in my footer. Hope it's of use to you:
declare
l_person_rec wwsec_person%rowtype;
begin
htp.print('<div class=PortletText1>');
l_person_rec := wwsec_api.person_info( wwctx_api.get_user_id() );
if (l_person_rec.first_name = 'PUBLIC') then
htp.print(l_person_rec.first_name);
else
htp.print(l_person_rec.first_name || ' ' || l_person_rec.last_name);
end if;
begin
htp.print('(' || wwsec_api.group_info(wwsec_api.get_defaultgroup()).name ||
exception when others then
null;
end;
htp.print('</div>');
end; -
Unstructured UI Template Substitution tags - PROBLEM
Hello
I'm trying to make a UI Template, but are having problems with the substitution tags.
I want to make a home-link, but with my own text such as "Take me home"
I've tried this approach:
Take me home
But as a result i get the standard icon for home, with the text "Home" under it
Can someone give me a hint how to solve this?
Regards
Per-JarleHi,
Looks like you are doing something wrong. Try something like this.
<HTML dir=#DIRECTION#>
<HEAD>
<TITLE>#TITLE#</TITLE>
</HEAD>
<BODY leftMargin="0" rightMargin="0" topMargin="0" marginheight="0" marginwidth="0" class="PageBG">
oracle
<TABLE >
<TR>
<TD><IMG SRC="#IMAGE_PREFIX#pobtrans.gif" BORDER="0" WIDTH="0" HEIGHT="4"></TD>
</TR>
</TABLE>
#PAGE.SUBPAGELINKS#
#BODY#
</BODY>
</HTML>
A home link will appear which will take you to oracle.
Thanks,
Sharmila -
Bug report:on application import: page template substitution strings double
apex version: 4.2.0.00.27
We encounter an issue when we import an application export. In all the page templates we see that the standard substitution strings in the HEADER and FOOTER area have been added for a second time.
EXPORTED CODE:
wwv_flow_api.create_template (
p_id => 32176400365879390 + wwv_flow_api.g_id_offset
,p_flow_id => wwv_flow.g_flow_id
,p_theme_id => 20
,p_name => '_vo_One Level Tabs_Simple'
,p_is_popup => false
,p_header_template => '<html lang="&BROWSER_LANGUAGE." xmlns:htmldb="http://htmldb.oracle.com">'||unistr('\000a')||
'<head>'||unistr('\000a')||
'<title>#TITLE#</title>'||unistr('\000a')||
'<script type="text/javascript" src="#IMAGE_PREFIX#app/common/js/app_common2.js"></script>'||unistr('\000a')||
'<script type="text/javascript" src="#IMAGE_PREFIX#app/common/js/datepicker.js"></script>'||unistr('\000a')||
'<script type="text/javascript" src="#IMAGE_PREFIX#app/common/js/datepicker-ext.js"></script>'||unistr('\000a')||
'<script type="text/javascript" src="#IMAGE_PREFIX#app/common/js/app_show_hide_region.js"></script>'||unistr('\000a')||
'<script type="text/javascript" src="#IMAGE_PREFIX#app/common/js/app_desktop_all.js"></script>'||unistr('\000a')||
'<script type="text/javascript" src="#IMAGE_PREFIX#app/common/js/app_legacy.js"></script>'||unistr('\000a')||
'<link rel="stylesheet" href="#IMAGE_PREFIX#app/pbh/css/pbh.css" type="text/css" />'||unistr('\000a')||
'<!--[if IE]><link rel="stylesheet" href="#IMAGE_PREFIX#themes/theme_20/ie.css" type="text/css" /><![endif]-->'||unistr('\000a')||
'#APEX_CSS#'||unistr('\000a')||
'#TEMPLATE_CSS#'||unistr('\000a')||
'#THEME_CSS#'||unistr('\000a')||
'#PAGE_CSS#'||unistr('\000a')||
'#TEMPLATE_JAVASCRIPT#'||unistr('\000a')||
'#APPLICATION_JAVASCRIPT#'||unistr('\000a')||
'#PAGE_JAVASCRIPT#'||unistr('\000a')||
'#HEAD#'||unistr('\000a')||
'</head>'||unistr('\000a')||
'<body #ONLOAD#>#FORM_OPEN#'
,p_box =>
'<div id="t20Tabs">#TAB_CELLS##NAVIGATION_BAR#</div>'||unistr('\000a')||
'<table border="0" cellpadding="0" cellspacing="0" summary="" id="t20PageBody" width="100%">'||unistr('\000a')||
'<td width="100%" valign="top" id="t20ContentBody">'||unistr('\000a')||
'<div id="t20BreadCrumbsLeft">#REGION_POSITION_01#</div>'||unistr('\000a')||
'<div id="t20Messages">#GLOBAL_NOTIFICATION##SUCCESS_MESSAGE##NOTIFICATION_MESSAGE##REGION_POSITION_02#</div>'||unistr('\000a')||
'<div id="t20ContentMiddle">#BOX_BODY##R'||
'EGION_POSITION_03##REGION_POSITION_04##REGION_POSITION_05##REGION_POSITION_06#</div>'||unistr('\000a')||
'</td>'||unistr('\000a')||
'</tr>'||unistr('\000a')||
'</table>'
,p_footer_template =>
'<div class="smallfont">PBH Versie: #APP_VERSION#</div>'||unistr('\000a')||
'#FORM_CLOSE# '||unistr('\000a')||
'#DEVELOPER_TOOLBAR#'||unistr('\000a')||
'#GENERATED_CSS#'||unistr('\000a')||
'#GENERATED_JAVASCRIPT#'||unistr('\000a')||
'</body>'||unistr('\000a')||
'</html>'
,p_success_message => '<table summary="" border="0" cellpadding="0" cellspacing="0" id="t20Notification">'||unistr('\000a')||
'<tr><td class="L"></td><td width="100%">#SUCCESS_MESSAGE#</td><td class="R"></td></tr>'||unistr('\000a')||
'</table>'
,p_current_tab => '#TAB_LABEL#'
,p_non_current_tab => '#TAB_LABEL#'
,p_notification_message => '<table summary="" border="0" cellpadding="0" cellspacing="0" id="t20Notification">'||unistr('\000a')||
'<tr><td class="L"></td><td width="100%">#MESSAGE#</td><td class="R"></td></tr>'||unistr('\000a')||
'</table>'
,p_navigation_bar => '#BAR_BODY#'
,p_navbar_entry => '#TEXT#'
,p_region_table_cattributes => ' summary="" cellpadding="0" border="0" cellspacing="5" align="left"'
,p_breadcrumb_def_reg_pos => 'REGION_POSITION_01'
,p_theme_class_id => 1
,p_grid_type => 'TABLE'
,p_grid_always_use_max_columns => false
,p_grid_has_column_span => true
,p_grid_emit_empty_leading_cols => true
,p_grid_emit_empty_trail_cols => false
,p_has_edit_links => true
,p_translate_this_template => 'N'
,p_template_comment => ''
RESULT IN APEX for the HEADER
<html lang="&BROWSER_LANGUAGE." xmlns:htmldb="http://htmldb.oracle.com">
<head>
<title>#TITLE#</title>
<script type="text/javascript" src="#IMAGE_PREFIX#app/common/js/app_common2.js"></script>
<script type="text/javascript" src="#IMAGE_PREFIX#app/common/js/datepicker.js"></script>
<script type="text/javascript" src="#IMAGE_PREFIX#app/common/js/datepicker-ext.js"></script>
<script type="text/javascript" src="#IMAGE_PREFIX#app/common/js/app_show_hide_region.js"></script>
<script type="text/javascript" src="#IMAGE_PREFIX#app/common/js/app_desktop_all.js"></script>
<script type="text/javascript" src="#IMAGE_PREFIX#app/common/js/app_legacy.js"></script>
<link rel="stylesheet" href="#IMAGE_PREFIX#app/pbh/css/pbh.css" type="text/css" />
<!--[if IE]><link rel="stylesheet" href="#IMAGE_PREFIX#themes/theme_20/ie.css" type="text/css" /><![endif]-->
#APEX_CSS#
#TEMPLATE_CSS#
#THEME_CSS#
#PAGE_CSS#
#TEMPLATE_JAVASCRIPT#
#APPLICATION_JAVASCRIPT#
#PAGE_JAVASCRIPT#
*#APEXCSS#*_
*#TEMPLATECSS#*_
*#THEMECSS#*_
*#PAGECSS#*_
*#APEXJAVASCRIPT#*_
*#TEMPLATEJAVASCRIPT#*_
*#APPLICATIONJAVASCRIPT#*_
#HEAD#
</head>
<body #ONLOAD#>#FORM_OPEN#
The added substitution strings are bold + underlined.
Is there a parameter (application, export, template, instance level) that we can set to prevent this ?
Edited by: Karel C on 12-feb-2013 5:32
Edited by: Karel C on 12-feb-2013 5:32Hi Patrick,
The version info is: wwv_flow_api.set_version(p_version_yyyy_mm_dd=>'2009.01.12');
This should be wwv_flow_api.set_version(p_version_yyyy_mm_dd=>'2012.01.01');
... but this error is due to a manual modification of the export file.
We parameterise some values, so that the we can use the old-school DEFINE variables in our deploy process via SQL/plus.
One of the developers made a copy-paste error when doing that ...
So there is no bug !
Thanks for the tip !!
Kind regards,
Karel -
Page Template Substitutions Order
I just discovered that my AppEx (3.1 on XE) is not substituting #PARENT_TAB_CELLS#, #TAB_CELLS# or #HOME_LINK# when they are come after #BOX_BODY# in the template. Does anyone know if that a bug or by design? The documentation indicates that #FORM_OPEN# must come before #BOX_BODY# and #FORM_CLOSE# must come after but it does not specifically say anything about the order of other substitution strings.
Hello,
It's designed that way, since 99% of the time that's how it's used.
If you are trying to place content regions above tabs I suggest you use one of the #REGION_POSITION_NN# substitutions.
Regards,
Carl
blog : http://carlback.blogspot.com/
apex examples : http://apex.oracle.com/pls/otn/f?p=11933:5 -
Hallo,
in the 2.2 Page Templates the headers are like this:
<html lang="&BROWSER_LANGUAGE." xmlns:htmldb="http://htmldb.oracle.com">
<head>
#HEAD#
<link rel="stylesheet" href="#IMAGE_PREFIX#themes/theme_13/theme_V22.css" type="text/css" />
<!--[if IE]><link rel="stylesheet" href="#IMAGE_PREFIX#themes/theme_13/ie.css" type="text/css" /><![endif]-->
<title>#TITLE#</title>
</head>
The actual page code i receive from the template is this:
<html lang="de" xmlns:htmldb="http://htmldb.oracle.com">
<head>
<script src="/i/javascript/htmldb_html_elements.js" type="text/javascript"></script>
<script src="/i/javascript/htmldb_get.js" type="text/javascript"></script>
<script type="text/javascript">
<!--
/*Global JS Variables*/
var htmldb_Img_Dir = "/i/";
//-->
</script>
<link rel="stylesheet" href="/i/css/core_V22.css" type="text/css" />
<!--[if IE]><link rel="stylesheet" href="/i/css/core_ie_V22.css" type="text/css" /><![endif]-->
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252" />
<link rel="stylesheet" href="/i/themes/theme_13/theme_V22.css" type="text/css" />
<!--[if IE]><link rel="stylesheet" href="/i/themes/theme_13/ie.css" type="text/css" /><![endif]-->
<title>One</title>
</head>
Where are these lines coming from ?
<script src="/i/javascript/htmldb_html_elements.js" type="text/javascript"></script>
<script src="/i/javascript/htmldb_get.js" type="text/javascript"></script>
<script type="text/javascript">
Normally they should be in the header of the page attributes, but its a standard page so all attributes are empty.
I'm confused, too much time without template work.
Thanks,
JochenHello,
These lines here are automatically inserted by the APEX engine.
<script src="/i/javascript/htmldb_html_elements.js" type="text/javascript"></script>
<script src="/i/javascript/htmldb_get.js" type="text/javascript"></script>
<script type="text/javascript">
<!--
/*Global JS Variables*/
var htmldb_Img_Dir = "/i/";
//-->
</script>
<link rel="stylesheet" href="/i/css/core_V22.css" type="text/css" />
<!--[if IE]><link rel="stylesheet" href="/i/css/core_ie_V22.css" type="text/css" /><![endif]-->
You have very minimal control of including them or not and in most cases it should just be left alone.
Carl -
How to reference template substitution string in PL/SQL condition
hi -- I need to conditionally display an item based on the value of #TITLE#. I'm currently trying a pl/sql expression function body returning boolean
DECLARE
page_type VARCHAR2(1000);
BEGIN
page_type := lower(substr(:TITLE,instr(:TITLE,'Query')));
if (page_type = 'query') then
return TRUE;
else
return FALSE;
end if;
END;
There are no errors, but the condition is not being met when it should be.
I tried setting some app items to the value of #TITLE# and I'm obviously not referencing it correctly; they're all null:
:TEST_VALUE := &TITLE.;
:TEST_VALUE2 := :TITLE;
:TEST_VALUE3 := V('TITLE');
Help?
Thanks,
CarolHi,
You can use javascript on page HTML header
<script>
function getDocTitle(pItem){
$x_Value(pItem, document.title);
</script>And page body
onload=" getDocTitle('Px_YOUR_ITEM');"Br, Jari -
All,
The list of "unstructured user interface template substitution tags" in the 3.0.8 online help is not complete, and it contains errors. Examples:
#PAGE.SUBPAGELINKS# is not documented.
#BANNER.NAVIGATION# should read #BANNER.NAVIGATOR#
#BANNER.CUSTPAGE# should read #BANNER.CUSTOMIZEPAGE#
Is updated documentation available? If not, please provide the information that you have.
Thanks,
Erik HagenSee http://hvirring.dk/portal/substitutiontags.asp for an updated "Unstructured user interface template substitution tags" help file (/help/wvttmptg.htm)
/Jesper -
Apex substitution strings cross reference chart
Hi everybody,
i finally managed to publish the (full?) list of Apex template substitution strings, in form of cross reference chart.
Errors, omissions and comments are welcome.
See the Apex template substitutions xref chart at:
http://oraclequirks.blogspot.com/2007/07/apex-substitution-strings-cross.html
Hope it helps
FlavioHello Scott!
thanks for you comment, i appreciate it.
Flavio
PS: in case you are going to add or change substitution string support in future releases, it'd help a lot to have them listed in a "What's new in this release" section of the accompanying documentation. -
Greetings all,
I am trying to change the color scheme of a theme and in testing, I just replaced one image in the theme and uploaded it to my workspace. I went into the template to try to change the image and it did not change the image for every instance. I am working on theme 10 and there is a right tab image that appears between each tab. When I changed it in the template, it only changed the first one. So when I updated the image in the template you will see from the excerpt below that it changed the image in line 3, but did not change the image in line 9. I would think there is a place I can have it change all images with the same name as I would not want to have to manually go in each time I add a new tab correct? Should I be looking at different template location?
1 <tr>
2 <td>
3<img alt="" src="wwv_flow_file_mgr.get_file?p_security_group_id=5026496612230570747&p_fname=tab_right1.gif"> <<<<<<<<<<< THIS ONE CHANGED
4</td>
5<td>
6<a class="t10standardtab" href="f?p=34463:3:1238808430545718::NO:::">Products</a>
7</td>
8<td>
9<img alt="" src="/i/themes/theme_10/tab_right.gif"> <<<<<<<<<<<<< THIS ONE DID NOT
<a class="eLink" tabindex="999" href="javascript:popupURL('f?p=4000:387:1238808430545718::::P387_ID,FB_FLOW_ID,FB_FLOW_PAGE_ID:11312927721883488245,34463,1');" title="Edit">
</td>
<td>I only was looking at theme 10 because I do like the tab layoutThat's a subjective call. My own opinion is obviously different...
>
So for example in the body template there is this line:
<td class="t10Logo" valign="top">#LOGO##REGION_POSITION_06#</td>
What do I do to edit things like the #LOGO# attribute or the #REGION_POSITION_06#
They are substitutions I understand but where do they pull their information from if that is even relevant.
>
Substitution strings control the positioning of page elements. The content of these elements is generated elsewhere. <tt>#LOGO#</tt> is replaced by the content of the Logo application attribute. <tt>#REGION_POSITION_06#</tt> would be replaced by any page regions assigned to the corresponding region display point.
It's not really a question of "editing" substitution strings, but of including or excluding them according to the purpose of the page template. For example, in Login page templates commonly include <tt>#LOGO#</tt>, but omit <tt>#TAB_CELLS#</tt> and <tt>#PARENT_TAB_CELLS#</tt> as tabs are not displayed until the user is authenticated.
The APEX documentation covers Page Template substitution strings.
So is a better way to edit a theme to export the theme and make the changes in the exported file and then upload it as a new theme rather than just making changes on the different pages?When a theme has been created—from scratch or from the repository—it is local to an application, so changes made to it will only affect that application (except where templates are subscribed to from a master app). A theme can be exported for import into other applications or inclusion in the instance repository; or its templates can be published for other apps to subscribe to.
Don't understand what you mean by +"just making changes on the different pages"+ ? -
Grid Layout - Getting two or more fields to display on the same line/row.
I am using version 4.2.
I have a form with a number of items.
I wish to control the display of the items so that some fields are beside each other (on the same line or row).
I have set the grid layout as follows:
:PX_ITEM1
Start New Row: Yes
Column: Automatic
Column Span: Automatic
:PX_ITEM2
Start New Row: No
Column: Automatic
New Column: Yes
Column Span: Automatic
When I do this the items are not displayed on the same row.
I can see when you change the "Start New Row" from No to Yes, the item fields ARE moved into the same <Div> that controls the row, but they just aren't displaying how I would like them.
Has anyone got this working?
Amanda.Hi Amanda,
I believe I have discovered the cause of the issue you are facing.
The problem is with the "Alert Region" region template and that it does not have any display points specified so indicate the number of grids that can fit in its region body. Without having any display points, the grid layout system attempts to use all columns available to its container. However, because the Alert Region has additional padding within, the columns will not fit and wrap to the next line.
To fix this issue, you will have to modify the "Alert Region" region template, go to "Display Points" and click Add Row. You will need to enter the following fields:
Name: Region Body
Template Substitution: BODY
Grid Support: Checked
Maximum Fixed Grid Columns: -1
This will fix the issue for you. I've logged a bug within our bug system to track this so we can fix it in a future release of APEX.
Best,
Shakeeb -
Panel Grid Layout: Column Span unexpected behavior.
Whenever in a Panel Grid Layout, when i give a cell to span over multiple columns(2,3,4 or any), the cell is spanned over the entire row only.. Why does this behavior happens? In JDeveloper, the spanning is shown correctly in design tab and preview tab.
Hi Amanda,
I believe I have discovered the cause of the issue you are facing.
The problem is with the "Alert Region" region template and that it does not have any display points specified so indicate the number of grids that can fit in its region body. Without having any display points, the grid layout system attempts to use all columns available to its container. However, because the Alert Region has additional padding within, the columns will not fit and wrap to the next line.
To fix this issue, you will have to modify the "Alert Region" region template, go to "Display Points" and click Add Row. You will need to enter the following fields:
Name: Region Body
Template Substitution: BODY
Grid Support: Checked
Maximum Fixed Grid Columns: -1
This will fix the issue for you. I've logged a bug within our bug system to track this so we can fix it in a future release of APEX.
Best,
Shakeeb
Maybe you are looking for
-
Photoshop CS6 on a Mac using an Epson Stylus PRO 3800 printer.
Installed Photoshop CS6 on a Mac Version 10.9.4. Installed an Epson Stylus PRO 3800 printer. When I try to print through Photoshop the dialogue box won't give the option to color manage. I followed the link suggested in the print dialogue box but tha
-
On Windows7 Premium Home Edition, I cannot get a new tab to open no matter what I try. On occasion, if I click on a link on the current page, a second tab will open, but 99% of the time I am stuck using the first tab for everything and using the back
-
How can I make MUSE upload one png that it overlooks? Cache cleared & shows in Preview
MUSE uploads everything to BC except an inport png. I cleared the cache, it shows inPreview, no conflicts noted in Assets and the Browser reflects any other changes I make to the page. The space for the image is missing online and the entire page m
-
How can I fix an unmapped account in FDMEE
Hello, I'm trying to understand where I can fix unmapped accounts (or any other dimension) in FDMEE. In FDQM there was a FIX button, where you could fix it on the spot, or export to excel all the unmapped members, fix and reload. Thanks Lilach
-
How can I view all that is stored in my icloud photo?
I would like to see and edit all that is stored in my icloud? How can I do that?