IF statement for navigation in a Region Template

I have a region template where I display links to nodes in the current level.
Example:
level 0 nodes: About Us, Employees, Contact Us, Investors
level 1 nodes of About Us: Fun Stuff, Photos, History
level 2 nodes of History: 1910, 1920,1930
So if I was in the section/level About Us>History my region template would display links to 1910,1920,1930. I know there is a fragment that does this for me but what I need is a little more custom.
What I want to do is is write an if statement in the region template that says something like:
If (currentlevel has children)
display childrenlevelNodes
else
display parentlevelNodes
endif
Any ideas? I am a beginner when it comes to Idoc.

Actually I got it working. Someone before me was using some code but it wasn't working exactly how I wanted. So I incorporated their code back in after your help with the childNodeId thing and now it works!!
<!--$childLevel = level-->
<!--$curLevel = level-->
<!--$childNodeId = ssGetRelativeNodeId(siteId, nodeId, "child")-->
<!--$parentNodeId = ssGetRelativeNodeId(siteId, nodeId, "parent")-->
<!--$originalNodeId = nodeId, drewOne = "", originalNodeParentId = ssGetRelativeNodeId(siteId, nodeId, "parent") -->
<ul>
     <li>
<!--$if (childNodeId)-->
     <!--$childLevel = level + 1-->
<!--$endif-->
<!--$loop SiteStudioNavNodes-->
          <!--$if (level eq childLevel) and ((originalNodeId eq parentNodeId) or (originalNodeParentId eq parentNodeId))-->
     <!--$hideIt = ""-->
     <!--$hideFrom = ssGetNodeProperty(SiteStudioNavNodes.nodeId, "hideFromRegion")-->
     <!--$showOnlyIn = ssGetNodeProperty(SiteStudioNavNodes.nodeId, "showOnlyInRegion")-->
          <!--$if showOnlyIn-->
               <!--$if showOnlyIn like ("*" join region join "*")-->
               <!--$else-->
               <!--$hideIt = 1-->
               <!--$endif-->
          <!--$endif-->
     <!--$if hideFrom and (hideFrom like ("*" join region join "*"))-->
     <!--$hideIt = 1-->
     <!--$endif-->
     <!--$if not hideIt-->
          <!--$if drewOne-->
                    <!--$endif-->
                    <!--$label-->
                    <!--$drewOne = 1-->
               <!--$endif-->
          <!--$endif-->
     <!--$endloop-->
     </li>
</ul>

Similar Messages

  • Same template for more than 8 regions in a page

    anyboday can explain how to apply same template for more than 8 regions in a page ?

    Hello,
    You should be able to apply the same template to any number of regions on the page. There is no constraint.
    Carl

  • Best approach -Tabs based ADF Tree left side navigation with Dynamic Regions with out UI Shell

    Hi,
    Somebody can help for the best approach to implement the following requirement.
    Req: When the user select the ADF Tree left side navigation menu, each menu will open as multiple tabs(Dynamic Tabs) in right side content area with out UI Shell Template.
    I completed the
    Step-1: From the Model project, I can able to render ADF Tree in the using view and view links. I can get the adf tree which is having 3 menu items. Each menu item having 2 sub menu's.
    I took each menu item as one(1) taskflow, each taskflow will have two(2) fragments.
    Total I have 3 task flows as Menu Items and 6 fragments for sub menu's.
    Step-2:  My question is How do I implement Tab based the ADF tree navigation (left side area to dynamic regions in content area) through dynamic regions? Please provide the steps in view layers.

    Than ks for your response.
    This is working fine for ADF Tree navigation with dynamic regions if the taskflow having only one fragment. if the taskflow having more than one fragments, this will not work. The following conditions are always satisfies one page fragment of either "employees" or "departments" task flow.  If the "employees" task flow have 2 page fragments, it's not work even you pass parameters through routers.
    public TaskFlowId getDynamicTaskFlowId() {
    if (currentTaskFlowID == null ||
    currentTaskFlowID.equalsIgnoreCase(“employees”)) {
    return TaskFlowId.parse(employeetaskFlowId);
    if (currentTaskFlowID != null &&
    currentTaskFlowID.equalsIgnoreCase(“departments”)) {
    return TaskFlowId.parse(departmetaskFlowId);
    return TaskFlowId.parse(employeetaskFlowId);
    My question is "Same use case with Dynamic Tabs" when the user click on any adf tree node.

  • Region templates not refreshed until after restart

    Hi guys,
    Another problem we are facing is when updating region templates. On a local workstation with JDev and a local SSXA connected to a remote UCM, changes to the region template's underlying JSP are taken into account on every page load. However, when using the remote SSXA connected to the same remote UCM, changes to the region template are not taken into account until the SSXA server is restarted.
    Surely there must be some caching parameter somewhere? How can we modify this behaviour?
    Thanks again!

    Hi ,
    Download 13502977 from MyOracleSupport and upgrade the UCM server .
    After that install the JDev plugins from the upgraded server by navigating to :
    /Oracle_ECM1/ucm/Distribution/RIDC/jdev
    /Oracle_ECM1/ucm/Distribution/SiteStudioExternalApplications/jdev
    After this test to see if the issue still persists .
    Reason for asking this is I am not able to see any issues with SSXA region templates .
    Hope it helps .
    Thanks
    Srinath

  • Dreamweaver Teamplate with Library Item for Navigation/Sidebar not updating editable classes

    I have a Dreamweaver Template that contains two Library items. One Library item is my navigation bar, the other is a sidebar that shows different content depending on what page you are on. I'm assigning an editable class "active" to the navigation bar to show you are on a particular page, and also assigning the editable class "active" to the sidebar to reveal a portion of the sidebar with links pertaining to that specific page. The default value for the class is "hidden". So what is happening is when I open a page I have created and "edit" the Library Items in it to edit these classes, it resets resets all the other pages on the site to the default class values. How am I able to use editable classes and Library Items to achieve this kind of functionality? The idea is to only have ONE navigaton bar to update on the site and to only have ONE sidebar item to update. Here is an example of the sidebar and navigation in action so you can see what I'm going for. Notice the green button in the navigation bar (that is a list item with the class "active" which is an editable class in the Library Item, also notice the tan links in the sidebar, that is an unordered list that has an editable class of "active" in the Library Items --- these editable classes reset to their defaults when updating the Library Item on the website).
    http://www.brumleve.org/joe/temp/CAP/mission.html

    In my understanding, whenever you edit the contents of a library item, it will update all other occurances of this library item on the rest of the site. That's "working as designed" as far as I know, unless you break the link by telling it to not update - which kinda defeats the purpose I think.
    But theres another way to do this using template properties, i#ve been using this approach myself a couple of times:
    Write your navigation bar in the template (.dwt) file itself, then select the class= of your first menu item and choose .. (names might be off, I am using a non-English copy of DW): "modify > template > make attribute editable" from the main menu. Do so for all your menu items and name these new template properties something like "item_x_class"
    You'll end up with something like this in your template source:
    <div class="@@(item_1_class)@@">
    and a matching
    <!-- TemplateParam name="item_1_class" type="text" value="active" --> in the header
    Now, on each page, you can set the class within the template properties dialog ("modify > template properties"). If your main menu changes, it won't overwrite your template properties, but still update all pages when you do make a change to the menu.
    If you're using multiple templates for your site, consider nesting templates, so the master template already includes your navbar and all subsequent templates will "inherit" changes to the navbar code (sans the editable class property).
    Hope this helps.. or at least gives you an idea for further experiments..
    Stephan

  • How to write a case statement for the totals column of two different years (2013 and 2014) of the same month so that I can get a +/- column

    Please Help!!!
    How to write a case statement for the totals column of two different years (2013 and 2014) of the same month so that I can get a +/- column.
                                      January 2014         January
    2013                            +/-
                    Region   Entry   Exit  Total    Entry   Exit   Total   (Total of Jan2014-Total of Jan2013)
                    A               2         3      
    40        5       7        30                    40-30= 10

    What is a table structure? Sorry cannot test it right now..
    SELECT <columns>,(SELECT Total FROM tbl WHERE Y=2014)-(SELECT Total FROM tbl WHERE Y=2013)
    FROM tbl
    Best Regards,Uri Dimant SQL Server MVP,
    http://sqlblog.com/blogs/uri_dimant/
    MS SQL optimization: MS SQL Development and Optimization
    MS SQL Consulting:
    Large scale of database and data cleansing
    Remote DBA Services:
    Improves MS SQL Database Performance
    SQL Server Integration Services:
    Business Intelligence

  • Hide / Show region template - how to make it stay visible after NEXT& PREV?

    Hello,
    I am using the Hide / Show region template (by the way great idea to create this template ;)
    By default the region is hidden. If i want to see the region content (it is a report) I click on that icon and it becomes visible. For my report I use the pagination "ROW Ranges X to Y of Z (with pagination)".
    The issue is that if I click NEXT of Previous, the region is closing (hidding).. and in order to see the next / previous page of my report I have to re-open it..
    Is there any known workaround for this?
    Thank you in advance
    Anca

    I would start at Re: Toggle all hide show regions on a page open/closed
    It references the using javascript to manipulate your hide/show regions. It should get you started in the right direction. It is about the most straight-forward example I have seen for what you are trying to do<br><br>
    You could trigger the javascript after your page is rendered by calling it from the page footer and reference the values of page items to determine if you are supposed to hide the region(s).<br>
    Create a page item called P88_HIDESHOW_REGION1 and set it's value to Y or N depending on whether the #REQUEST# has a string in it that is part of report pagination. If you hover over a "next page" button in a report, check out the resulting URL that pops up in your browser.....it looks like ..../f?p=900:210:8352027355600111016:pg_R_241403738845262873:NO&pg_min_row=31&pg_max_rows=30&pg_rows_fetched=30
    <br>
    You could do an instr(:REQUEST,'pg_R_') > 0 then set P88_HIDESHOW_REGION1 = 'Y' else P88_HIDESHOW_REGION1 = 'N'. Your javascript called at the footer of the page could set the display of the region to on or off depending on the result of P88_HIDESHOW_REGION1

  • Wee inconsistency in region template "Form Table Attributes"

    In the region template definition there is a field for specifying form table attributes. If I specify table attribute(s) they work as expected. If I then add an item type of "Stop and start table" to the region, the custom attributes are not used in the subsequent tables.
    It's a minor thing... perhaps this can be fixed (or has been fixed) in 3.0?

    Atul:
    I dont know what the 'Alternate Source' is
    In the Source section set
    Source value or expression to be the name of the database column that has the URL (company_url)
    Post calculation Computation to be '<a h ref="' || :pxx_company_url || '">' || :pxx_company_url || '</a>'; where pxx_company_url is the page-item name.
    I have specified 'h ref' instead of 'href' so that the forum software doesnt mess up the post.
    Varad

  • Links for navigation tree not rendering as expected

    I have a tree menu that links to various applications. It provides single sign-on to different applications for intranet users, passing encrypted authentication details between apps. The tree table is defined as:
    APPLICATION_ID NUMBER(10),
    APPLICATION_NAME VARCHAR2(50),
    LOCATION VARCHAR2(500),
    PARENT_APPLICATION_ID NUMBER(10),
    SHOW VARCHAR2(1)
    The location column provides the link for the tree. Here is an example of one record:
    set escape ~
    insert into application_menu_tree
    values (2, 'Application Name',
    'f?p=100:102:::NO::P101_USERNAME,P101_PASSWORD,MENU_SESSION:~&MENU_USERNAME.,~&MENU_PASSWORD.,~&APP_SESSION.',
    1,
    NULL);
    This works without a problem in the full version of APEX/10gR2/Oracle App Server. Mouse over a link and you see the &APP_USERRNAME. replaced with the encrypted version of the username. Same with the rest.
    Export/import into XE though and the link doesn't pick up the &MENU_USERNAME., &MENU_PASSWORD., or &APP_SESSION. when rendering the menu. A mouse-over of the link shows those values are not being replaced in the string, but if I pull the session values using the Edit links, all are populated just fine.
    If I copy that same string (the one that is used for the link in the tree), and paste it directly to an html region as an href, the variables are replaced as expected and the link works just fine.
    So, a link pulled from the table doesn't have those values replaced, where the same string in an html region as an href does just fine. The table method does work in the full version, but doesn't in two installs of XE (same page definition - export/import).
    Any ideas?
    Thanks,
    Ron

    Did you change anything when moving the application to XE, or did you just a plain export/import? Plain export/import except the choice of theme- was using 16 in 2.2 and changed to an XE supplied theme.
    You exported the application using UTF8 and imported it using UTF8 as well, right? Yep
    Which version of XE are you using, the Western European Edition or the Universal one?Universal
    What was the exact select statement and what type of region did you use? The tree query is about as straight forward as can be:
    select "APPLICATION_ID" id,
    "PARENT_APPLICATION_ID" pid,
    "APPLICATION_NAME" name,
    location link,
    null a1,
    null a2
    from "#OWNER#"."APPLICATION_MENU_TREE"
    Was it the same in XE and Apex 2.2.1?Yep - no difference in data or query, and the page is exactly the same except for the application theme.
    I just modified the query to do the replacement instead and that's working just fine in XE. New query:
    select "APPLICATION_ID" id,
    "PARENT_APPLICATION_ID" pid,
    "APPLICATION_NAME" name,
    REPLACE(
    REPLACE(
    REPLACE(location, '#APP_SESSION#', :app_session),
    '#MENU_USERNAME#', :menu_username),
    '#MENU_PASSWORD#', :menu_password) link,
    null a1,
    null a2
    from "#OWNER#"."APPLICATION_MENU_TREE"
    I'll post an example of what I'd set up before to the Oracle hosted APEX when I get a chance and toss the link here. Being 2.2.1 it should work there as well.
    Thanks again for the suggested change!
    Ron

  • Access CDF MetaData from Region Template

    How can I access the MetaData of a CDF from the Region Template?
    I have read that I can use DOC_INFO, but this does not seem to work. I tried:
    DOC_INFO.dDocAccount and got nothing.
    I tried:
    executeService("DOC_INFO")
    DOC_INFO.dDocAccount
    Thank you in advance for any help.
    _t                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

    If you're looking for the CDF that's assigned to the region template, use:
    <!--$#active.[metadata field name]-->
    For example, <!--$#active.xDescription-->
    If you're trying to get from a different CDF, use:
    <!--$dDocName="[Content ID]"-->
    <!--$executeService("DOC_INFO_BY_NAME")-->
    <!--$#active.[metadata field name]-->
    For example,
    <!--$dDocName="CONTENT123456"-->
    <!--$executeService("DOC_INFO_BY_NAME")-->
    <!--$#active.xDescription-->

  • Modify a report region template

    Hi
    I am new on Apex, so my question could seem elementary! :-(
    I would like to create a mutiple report on one region, as explained and described on this forum in many places, but I am stuck at the begining!!
    - How can I copy a report region template?
    and
    - How can I copy a page template?
    Many thanks for your lights
    Regards,
    Fred

    Hi Fred,
    In your application, go to Shared Components, Templates. Then click the Create button and select the template type. On the next prompt, ensure that you select the "As a Copy of an Existing Template" option, then click Next until you get to a list of current templates. Change the name of the template you want to copy and change the Copy? drop-down from No to Yes and click the Copy xxxx Templates button. You will then be returned to the templates list - click on your new template to edit it.
    Andy

  • Initial State of Navigation Panel

    Hi all,
    I have an issue with an SAP portal ivew linked to a guided procedure. When the user clicks on it the navigation panel on the left is closed. We have to tried to set the proposerty "Initial State of Navigation Panel" to "Open"  but it did not work (although we tried another iView and it did work). Can you please indicate what could be the possible reason for overriding this property? Thank you in advance.

    Hi SAPer,
    Did you try looking at the "Initial State of Navigation Panel" value of your iView in question in the Portal role? Assuming this is a delta-link copy, this property might have its delta-link inheritance broken through modification prior to this.
    Cheers.
    Best Regards,
    Zhi Liang

  • Conceptual problem: AJAX Memory tree for navigation

    Hello,
    I have a conceptual problem with a navigation tree.
    I have to implement a AJAX memory tree for navigation purposes, which should be on page 0, so this tree is on the left side of every page.
    Therefore I searches some examples and found this: http://www.oracle.com/technology/pub/articles/spendolini-tree.html
    So I try to rebuild this example with my custom tables and recognised that this example is very slow. I have round about 100 nodes in the tree and my database and network connection is extremly fast(I`m sitting in a proffesional data center).
    So first of all I am wondering why the tree is so slow when I try to expand it and if it is possible to use this tree on the page 0.
    Because of the performance problem I searched for some alternatives, but I didn`t found one.
    Every custom APEX-tree is not dynamic(AJAX) and the dynamic APEX-lists can not base on a select-statement.
    So at this moment I don`t know how to build a AJAX memory tree for navigation which is fast, looks good and works as expected.
    Does anybody have an idea why the tree is so slow?
    Are there alternatives which I can try to use?
    Thank you,
    Tim

    Hi Tim
    100 nodes is not a lot of data for a tree, so why bother with AJAX at all.
    Just render the entire tree, and let the user expand and collapse nodes as they like.
    APEX has a dhtml tree in the standard themes which is enough to get you started.
    The issue I had with it is that it isn't stateful, so doesn't remember which nodes are open between page refreshes.
    That's what got me into ExtJS originally.
    If you look at my demo, I have a couple of examples worth looking at:
    - [tree using APEX lists|http://apex.oracle.com/pls/otn/f?p=200801:2025:0::NO:::] uses APEX built in hierarchical lists, which allows conditional logic on nodes
    - [AJAX editable tree|http://apex.oracle.com/pls/otn/f?p=200801:2013:0::NO:::] which is fully AJAX enabled.
    The other point worth mentioning is if you are using hierarchical queries for your tree you should consider restructuring your data set.
    Typically trees are fairly static, in that the data changes very little over time.
    This makes a very strong case for maintaining the node sequence and level in a denormalised way.
    Data updates become more expensive, but read operations, which will be the bulk of your operations will be very fast.
    Many choices on how to implement, e.g. materialized views with refresh on demand.
    Regards
    Mark
    [Random Insights into Oracle|http://oracleinsights.blogspot.com/] | [Marks Playpen|http://apex.oracle.com/pls/otn/f?p=200801]

  • Stats for Web reports

    Hi Friends
    We are using portals to run reports.When the queries run on Bex analyser, stats recording fine but however when we run the queries on Portals,the stats are not recording.
    Then I did load data from RSDDSTAT table into 0BWTC_C02 cube.Now no.of navigation isok but overall time and meantime are displaying as '0'.
    What is the correct solution to record bw stats for web based queries?
    Regards,
    Chama.

    Hi
    My problem is not the performance problem.
    When query ran on portal then BW stats not showing the details of meantime ,overall meantime,time olap processor etc.
    When I run the stats query '0BWTC_C10_Q010' - Utilising OLAP, It's showing only number of navigations and it's showing remaining all the fields '0'.
    How can I resolve this problem.
    Regards,
    Chama.

  • 'Scrollable Content Region' - Region Template - Anybody used successfully?

    I have just implemented a "Data Load" function which is the OOTB page type in apex 4.2 which allows the end user to go through a wizard and import csv data into a table.
    When the user is viewing the data to be imported - they have to scroll across the length of the screen (depending on how many columns you are loading).
    I noticed there is a Region template called "Scrollable Content Region". I tried applying this template to my region, and when this didn't work, to a container region.
    The scrollbars appear (horizontally and vertically) but they are greyed out as the region is still at max width and you have to use the browser to scroll instead.
    I think this looks untidy as the header colour-styling ends, as well as other regions being stretched.
    Has anyone used this successfully before?
    Amanda.

    Hi Amanda,
    What I've done with this region is edit the template and change the style for the div.uRegionContent.  You'll see that it says "overflow: scroll", I change it to "overflow: auto", this way the scroll bars will only show when they are needed.
    The other useful thing is to remove the hardcoded height and define it on a per region basis.
    So, if my region ID (STATIC_REGION_ID) is empRegion then the height can be defined as:
    #empRegion > .uRegionContent {height: 600px;}
    Of course you could do this without modifying the region by adding !important.
    #empRegion > .uRegionContent {height: 600px!important; overflow: auto!important;}
    Hope this helps.
    Thanks
    -Jorge

Maybe you are looking for