OK I've got this mostly sorted out, just having a problem with the
finishURL.

I've grabbed dmNews.cfm from the core and copied it to customadmin,
made the relevant alterations to customadmin.xml to point the 'News'
link at my /customadmin/dmNews/dmNews.cfm and added a finishURL to the
widgets:typeadmin call in my customised version. This is still using
the default dmNews cfc and plpEdit for the actual editing process.

When I save, the system returns me to the default /farcry/content/
dmNews.cfm instead of my custom version as specified in the finishURL
- any idea what I need to do to return it to the custom version?

This is what I have in my custom dmNews.cfm (apologies for the long
post)


<cfset finishURL="/farcry/admin/customadmin.cfm?module=dmNews/
dmnews.cfm" />

<cfset editobjectURL = "#application.url.farcry#/conjuror/
invocation.cfm?
objectid=##recordset.objectID[recordset.currentrow]##&typename=dmNews&ref=typeadmin&module=dmNews/
dmnews.cfm&finishURL=#urlencodedformat( finishURL )#">

<!--- set up page header --->
<admin:header title="News Admin" writingDir="#session.writingDir#"
userLanguage="#session.userLanguage#"
onload="setupPanes('container1');">

<cfscript>
        //This data structure is used to create the grid columns
        //remember to delimit dynamic expressions ##
        aCustomColumns=arrayNew(1);
        editobjectURL = "#editobjectURL#";

        //select
        stCol=structNew();
        stCol.columnType="expression";
        
stCol.title="#application.adminBundle[session.dmProfile.locale].select#";
        stCol.value="<input type=""checkbox"" class=""f-checkbox""
name=""objectid"" value=""##recordset.objectid##""
onclick=""setRowBackground(this);"" />";
        stCol.style="text-align: center;";
        //stCol.orderby="";
        arrayAppend(aCustomColumns,stCol);

        //edit icon
        stCol=structNew();
        stCol.columnType="evaluate";
        
stCol.title="#application.adminBundle[session.dmProfile.locale].edit#";
        stCol.value="iif(stPermissions.iEdit eq 1,DE(iif(locked and lockedby
neq
'##session.dmSec.authentication.userlogin##_##session.dmSec.authentication.userDirectory##',DE('<span
style=""color:red"">Locked</span>'),DE('<a
href=''#editObjectURL#''><img src=""#application.url.farcry#/images/
treeImages/edit.gif""
alt=""#application.adminBundle[session.dmProfile.locale].edit#""
title=""#application.adminBundle[session.dmProfile.locale].edit#""/></
a>'))),DE('-'))";
        stCol.style="text-align: center;";
        //stCol.orderby="";
        arrayAppend(aCustomColumns,stCol);

        //preview
        stCol=structNew();
        stCol.columnType="expression";
        
stCol.title="#application.adminBundle[session.dmProfile.locale].view#";
        stCol.value="<a href=""#application.url.webroot#/index.cfm?
objectID=##recordset.objectID##&flushcache=1"" target=""_blank""><img
src=""#application.url.farcry#/images/treeImages/preview.gif""
alt=""#application.adminBundle[session.dmProfile.locale].view#""
title=""#application.adminBundle[session.dmProfile.locale].view#"" /></
a>";
        stCol.style="text-align: center;";
        //stCol.orderby="";
        arrayAppend(aCustomColumns,stCol);

        //label and edit
        stCol=structNew();
        stCol.columnType="evaluate";
        
stCol.title="#application.adminBundle[session.dmProfile.locale].label#";
        stCol.value = "iif(stPermissions.iEdit eq 1,DE(iif(locked and
lockedby neq
'#session.dmSec.authentication.userlogin#_#session.dmSec.authentication.userDirectory#',DE('##replace(recordset.label[recordset.currentrow],'####','','all')##'),DE('<a
href=''#editObjectURL#''>##replace(recordset.label[recordset.currentrow],'####','','all')##</
a>'))),DE('##replace(recordset.label[recordset.currentrow],'####','','all')##'))";
        stCol.style="text-align: left;";
        stCol.orderby="label";
        arrayAppend(aCustomColumns,stCol);

        //datetimelastupdated
        stCol=structNew();
        stCol.columnType="evaluate";
        
stCol.title="#application.adminBundle[session.dmProfile.locale].lastUpdatedLC#";
        
stCol.value="application.thisCalendar.i18nDateFormat('##datetimelastupdated##',session.dmProfile.locale,application.mediumF)";
        stCol.style="text-align: center;";
        stCol.orderby="datetimelastupdated";
        arrayAppend(aCustomColumns,stCol);

        //status
        if (structKeyExists(application.types['dmNews'].stprops, "status")) {
                stCol=structNew();
                stCol.columnType="value";
        
stCol.title="#application.adminBundle[session.dmProfile.locale].status#";
                stCol.value="status";
                stCol.style="text-align: center;";
                stCol.orderby="status";
                arrayAppend(aCustomColumns,stCol);
        }

        //lastupdatedby
        stCol=structNew();
        stCol.columnType="value";
        stCol.title="#application.adminBundle[session.dmProfile.locale].by#";
        stCol.value="lastupdatedby";
        stCol.style="text-align: center;";
        stCol.orderby="lastupdatedby";
        arrayAppend(aCustomColumns,stCol);


        //expiry date - if it's passed, indicate it with an "x", then if it's
in 2050, show "never", otherwise show the date
        stCol=structNew();
        stCol.columnType="evaluate";
        stCol.title="Expiry";
        stCol.value="iif( isDate( expiryDate ), DE( iif( expiryDate lte
now(), DE('<span style=""color: red;""><strong>x</strong></span> '),
DE('') ) & iif( year( expiryDate ) eq 2050, DE('never'),
DE( dateformat( expiryDate, 'dd/mm/yy') )) ), DE('') )";
        stCol.style="text-align: right;";
        stCol.orderby="expiryDate";
        arrayAppend(aCustomColumns,stCol);

</cfscript>


<widgets:typeadmin
        typename="dmNews"
        permissionset="news"
        
title="#application.adminBundle[session.dmProfile.locale].newsAdministration#"
        aColumns="#aCustomColumns#"
        finishURL="#finishURL#"
        bdebug="0">
</widgets:typeadmin>


any insight is appreciated


B.

On Jun 27, 9:14 am, bsmith <[EMAIL PROTECTED]> wrote:
> Nope that's perfect.. for some reason I was under the mistaken
> impression you could only use mergetype="replace" on <section>
> elements.
>
> Thanks!
>
> On Jun 26, 7:59 pm, modius <[EMAIL PROTECTED]> wrote:
>
> > On Jun 26, 12:04 pm, bsmith <[EMAIL PROTECTED]> wrote:
>
> > > I guess I'm just looking to bounce around some ideas on the best way
> > > to go about it. I've played with the customadmin.xml file and I can
> > > "replace" this area pretty easily, but then it looks like I have to
> > > hand-code all the links to the other content functions, meaning that
> > > if/when these change in future we'll have to recode.
>
> > Is there anything this doesn't 
> > offer?http://docs.farcrycms.org:8080/confluence/display/FCDEV30/Custom+Admin
>
> > What other configuration options would you need?
>
> > -- geoffhttp://www.daemon.com.au/


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"farcry-dev" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/farcry-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to