[CS5.5] how to import a code snippet in the current page

Hi all

I got IDOMElement of the document UIDRef and imported to the code snippet. Here's the code-

 InterfacePtr<IDOMElement> documentElement(docRef, UseDefaultIID());

 if (documentElement == NULL)
    break; 

 if ((status = Utils<ISnippetImport>()->ImportFromStream(tStream, documentElement)) == kSuccess) 
    //success

( tStream is the IPMStream of the code snippet that I'm importing)

This code above is able to import the extract with success on the first page of the active document, but I can't be imported into current page instead. So to do this, I tried to get IDOMElement of UIDRef of the current page instead (logically, I thought this will import the excerpt of the current page).

 InterfacePtr<IDOMElement> documentElement(currentPageUIDRef, UseDefaultIID());

But the result is still - the documentElement is not null, but the code snippet is imported to the first page only.

Maybe the concept of IDOMElement is not clear to me, but I find that no documentation in the SDK Guide too. Can someone explain to me what is an IDOMElement and how to import a snippet of the current page?

Any help will be much appreciated. Thank you.

Hello Shawn,

have you tried the IDOMElement of the propagation or layer? You can't place items on a page.

Markus

Tags: InDesign

Similar Questions

  • How to clear a single block of the current page in the OPS

    Hi all

    How to erase a single block of the current page in the OPS. I used the CLEAR key.


    Thank you

    Hello

    I found the solution I wrote it in the button DELETE. I wrote the remove with vo1.setMaxFetchSize method (1);

    and remove called AOS

    Thank you

  • How can I transfer code snippets to DW2014?

    How can I transfer code snippets to DW2014?

    Try this related thread:

    Re: Move custom code snippets

    Nancy O.

  • How to import my Outlook contacts to the Surface?

    How to import my Outlook contacts to the Surface?

    http://answers.Microsoft.com/en-us/Windows/Forum/windows_rt-ECOMS/Outlook-contacts/497c4df0-5cde-4e97-87fc-a35e0da71da1

  • Cannot add code snippets to the triggers Panel

    Hi all, I'm on Edge animate 20141 CC and I'm unable to add code snippets in the triggers Panel. When I click on buttons, such as "Replay", the code appears in the Panel, but varied. I hit the return, but no change. Anyone would be able to tell me what I do wrong? Thank you for your suggestions. I'm on a MacBook Pro (late 2010) running Mac OS X 10.8.5

    Nevermind, I got it. For some reason, he wasn't adding the target to the code when I chose it, but it is now. Don't know what that I was different, but it works now.

  • Is there a way to delete a code snippet of the library of my snippets on board animate CC2014?

    Is there a way to delete a code snippet of the library of my snippets on board animate CC2014?

    When you click on "excerpts of my", it will list down all the extracts of registered user, you can right-click and click 'Clear' to delete.

  • How can getting error Code U44M1P7 during the upgrade, I fix?

    How can getting error Code U44M1P7 during the upgrade, I fix?

    Update product that you are trying to install?

    Is it compared to the creative or perpetual clouds?

    Please check following if you have creative clouds.

    http://helpx.Adobe.com/Creative-Suite/KB/error-u44m1p7-installing-updates-CCM.html

  • How to stop Contribute CS5 adding a paragraph when you create a new page via "copy of the current page.

    When I create a new page via 'Copy of the current page', the new page always gets an additional line of code. Contribute CS5 adds a paragraph that pushes my browsing down in the content area of my site. Can someone please help me get to stop this?

    <!--

    Code on the original page:

    < body >

    < div id = "container" >

    < div id = "header" >

    < div class = "logo" > < a href = "/" > < / has > < / div > <! - end .logo - >

    < div class = "navigation" >

    Code on the new page:

    < body >

    < div id = "container" >

    < div id = "header" >

    < div class = "logo" > < a href = "/" > < / has > < / div > <! - end .logo - >

    < style p = "margin-top: 0;" margin-bottom: 0; ' > < / p >

    < div class = "navigation" >


    ->

    If you are going to administer websites > users and roles > choose > change role settings > Editing > paragraph spacing, you put a line or two lines?

    If a line, select the two lines.

  • Help! How to link to information users at the user page?

    I created the connection index, register, and sign the php pages. MySQL. Now I'm trying to create the user profile page. But I can't link their information to the user page. So, how to link to information users at the user page? @

    maniragav26 wrote:

    I created the connection index, register, and sign the php pages. MySQL. Now I'm trying to create the user profile page. But I can't link their information to the user page. So, how to link to information users at the user page? @

    Can I assume you are using Dreamweaver server behaviors (I guess if you ask this question, it is likely that you would be).

    Go to the mode code in your "login" page Find the section of code that creates the DW:

    $LoginRS__query = sprintf ("SELECT Uname, Pword OF USERS WHERE Uname = %s AND Pword = %s",

    GetSQLValueString ($loginUsername, "text"), GetSQLValueString ($password, "text"));

    $LoginRS = mysql_query ($LoginRS__query, $connUsers) or die (mysql_error ());

    $loginFoundUser = mysql_num_rows ($LoginRS);

    If {($loginFoundUser)

    $loginStrGroup = "";

    Declare two session variables and assign them

    $_SESSION ['MM_Username"] = $loginUsername;

    $_SESSION ["MM_UserGroup"] = $loginStrGroup;

    INSERT THE CODE in RED below: 'id' is the name of the id column in your database table - if it were 'user_id' that's what you have inserted.

    $LoginRS__query = sprintf ("SELECT users id Pword, Uname, Uname WHERE = %s AND Pword = %s",

    GetSQLValueString ($loginUsername, "text"), GetSQLValueString ($password, "text"));

    $LoginRS = mysql_query ($LoginRS__query, $connUsers) or die (mysql_error ());

    $loginFoundUser = mysql_num_rows ($LoginRS);

    $row_rsUserDetails = mysql_fetch_assoc ($LoginRS);

    If {($loginFoundUser)

    $loginStrGroup = "";

    Declare two session variables and assign them

    $_SESSION ['MM_Username"] = $loginUsername;

    $_SESSION ["MM_UserGroup"] = $loginStrGroup;

    Now to find the under section of code in the 'login' page: (this implies that you have defined a 'success' page to return IF the connection information is correct):

    If (isset($_SESSION['PrevUrl']) & false) {}

    $MM_redirectLoginSuccess = $_SESSION ["PrevUrl"];

    }

    Header ("Location:".) $MM_redirectLoginSuccess);

    }

    else {}

    Header ("Location:".) $MM_redirectLoginFailed);

    }

    INSERT THE CODE in RED below: 'id' in $row_rsUserDetails ['id']; is the name you gave the id column in your database user table, so if it was "user_id" it would read as - $row_rsUserDetails ['user_id'];

    If (isset($_SESSION['PrevUrl']) & false) {}

    $MM_redirectLoginSuccess = $_SESSION ["PrevUrl"];

    }

    $_SESSION ['id'] = $row_rsUserDetails ['id'];

    Header ("Location:".) $MM_redirectLoginSuccess);

    }

    else {}

    Header ("Location:".) $MM_redirectLoginFailed);

    }

    NOW, you create your user details page.

    Create a Recordset, select the table of database you want to gather information about the user. Select the filter to 'none '.

    Go to the view code and at the top of the page, insert:

    <>

    $userId = $_SESSION ['id'];

    ?>

    NEXT FIND THE CODE THAT SELECTS DATA FROM THE DATABASE: (your will be slightly different as you use different details of connection and recordset)

    @mysql_select_db ($database_connUsers, $connUsers);

    $query_rsUserDetails = "SELECT * FROM USERS";

    $rsUserDetails = mysql_query ($query_rsUserDetails, $connUsers) or die (mysql_error ());

    $row_rsUserDetails = mysql_fetch_assoc ($rsUserDetails);

    $totalRows_rsUserDetails = mysql_num_rows ($rsUserDetails);

    Change the second line above to: (add red code below for your SELECT string) (remember WHERE 'id' - 'id' is the name of the column in your database table.)

    $query_rsUserDetails = "SELECT * FROM users WHERE id = '". " $userId. » ' ";

    It's her!

    You can now start "liaison" details on the user Details page.

  • How can I add reload the current Page in the toolbar Firefox 9?

    Once I have use customize toolbar, reload the current Page is not an option. I got this feature in previous versions of Firefox, and on another computer where Firefox has been updated to 9 the rest feature but I can't understand how to add to this new computer.

    Firefox 4 and later versions use a combined Stop/Reload/Go button that is placed at the right end of the address bar.

    During the process of loading page it shows as a stop button and once the charging button is replaced by a reload button.

    If you type in the address bar this button would then become a button go.

    Click the Reload button to duplicate the current tab in a new tab.

  • Hello I would like to create a Muse site with homepage and a member area with access code to access the other page of the site is possible this? Thank you

    Hello I would like to create a Muse site with homepage and a member area with access code to access the other page of the site is possible this? Thank you

    No. you're looking completely in the wrong place. These things requires a dynamic system that is appropriate like Wordpress, Joomla and so on. That or a paid Business Catalyst Pro account.

    Mylenium

  • How to display the current page and the total number of pages for a group

    Hi all
    I have a requirement to indicate the current page number and the total number of pages for a group. For example:

    < A >
    < 1 >
    Row1
    row2
    ....
    Clotilde
    < / 1 >
    < 2 >
    Row1
    row2
    ....
    Clotilde
    < / 2 >
    < 3 >
    Row1
    row2
    ....
    Clotilde
    < / 3 >
    < /A >

    Now my requirement is Group 1 can have lines going into several pages say x, so I need to show with in the Group 1 x and on the next page page 1 page 2 x etc.
    Although Group 2 spans several pages, I need to see page 1 of y... etc.

    Can someone help me please how to do this?


    Thank you
    Sunny

    Try if@section

  • How to make the current page menu item displayed in a different font color?

    Hello

    My menu bar works very well. The links I get the text to hover display the desired color. Now I want the item menu of the selected page show a third color.

    With live-code activated in Dreamweaver CS6, I can see the following code is generated by the dynamic menu:

    "< script type =" text/javascript"src="/CatalystScripts/Java_DynMenusSelectedCSS.js "> < / script > <!-dynamic output CSS menu start-> < div id ="cat_549633_divs"> < ul id ="nav_549633">< class li ="selected"> < a href =" / home.html "> home < /a > < /li >< li > < a href =" "/ leistungen.html" > Services < /a > < /li > < li > < a href = "/ uhrenservice.html" > Uhrenservice < /a > < /li " "> < li > < a href =" / versteigerungen.html "> Versteigerungen < /a > < /li > < li > < a href =" / diamanten.html "> Diamanten < /a > < /li > < li > < a href =" / ueber_uns.html "" > Uber each < /a > < /li > < li > < a href = "/ kontakt.html" > Kontakt < /a > < /li > < /ul > < / div > < script type = "text/javascript" > catSetSelectedCSSItem ('nav_549633'); < /script > <! - end of output CSS Dynamic Menu - >

    The .selected class is created in the first element of the list (home) because it is the current page.

    And here is my CSS:

    {#nav_549633}

    float: right;

    list-style-type: none;

    padding-top: 5px;

    }

    #nav_549633 li {}

    float: left;

    text-align: left;

    }

    #nav_549633 li a {}

    color: white;

    text-decoration: none;

    margin: 27px 0 0 0;

    font size: 13px;

    text-transform: uppercase;

    }

    #nav_549633 Li a: hover {}

    color: yellow;

    }

    {.selected

    color: Green;

    }

    The green font color does not appear. It is still white.

    In order to see if the class 'works"I tried a few other attributes that work!

    {.selected

    color: Green;

    padding: 20px

    background-color: blue;

    }

    In this case, the item appears as a blue box with 20px padding, just as expected - but the font color is always white.

    Can someone help me?

    Kind regards

    Herman

    Hello Ginoem50,

    Looking at your css looks like the selected class does not work because the li #nav_549633 one is more specific is the one who is listened to.

    change .selected li.selected a #nav_549633 and it should work.

    Hope this helps,

    Chad Smith | http://bcgurus.com/Business-Catalyst-Templates for only $7

  • How to detect the current page

    How can I undergo certain cfif conditions to detect the current page?

    < cfif? Page1.cfm IS > abc
    < cfelseif? Page2.cfm IS > def
    < cfelseif? Page3.cfm IS > IAD
    < cfelse > jkl
    < / cfif >

    Use the cgi variables...
    Try using to see who is available.
    GL, Mike

  • How can I get the name of the current page and the number?

    Hello world!

    Anyone know how to get the name of the current page and the number? What variable I should he request?

    Thanks in advance!

    The question of the application defined by the system: APP_PAGE_ID is the page number. For the name of the page, you will need to query the view of Apex with something like this:

    Select PAGE_NAME
    of APEX_APPLICATION_PAGES
    where PAGE_ID =: APP_PAGE_ID

    Good luck

    Stew

    PS Feel free to mark this reply as being correct, so it is.

Maybe you are looking for