0 Replies Latest reply: Mar 29, 2007 8:20 AM by 807574 RSS

    How to get the edit channel link from within the channel?

    807574
      Following problem:

      I want to include a link to edit the settings of a channel in the channel contents. The link should be the same as the edit button on the frame of the channel container. Searching through the provider jsps I found that the edit link is created in single.jsp. The code I need seems to boil down to
      <dt:obtainContainer container="$JSPProvider">
        <dtsingle:singleContainerProvider>
        <dtpc:getStringProperty key="editContainerName" id="editContainerName" scope="request"/>
        <dt:getName id="SingleContainer" scope="request"/> 
        <jx:declare id="editContainerName" type="java.lang.String"/>
        <jx:declare id="SingleContainer" type="java.lang.String"/>
          <dtsingle:obtainSelectedChannel>
      <A HREF="<dtpc:getDesktopURL/>?action=edit
      &provider=<%=editContainerName%>
      &targetprovider=<dt:getName/>
      &containerName=<%=SingleContainer%>"
       TARGET="_self"> EDIT! </A>
          
          </dtsingle:obtainSelectedChannel>
        </dtsingle:singleContainerProvider>
      </dt:obtainContainer>
      However I am unable to get that working in the channel, as I always receive a ProviderException on the line with

      <dt:obtainContainer container="$JSPProvider">

      What am I doing wrong, or is does the obtainContainer simply not work from within a channel?

      If anyone can help me out to get the edit link it would be greatly appreciated. Any hints and/or sample code would help alot.

      thanks!

      Message was edited by:
      obstler42