farcrycore / core

FarCry Core: a web app framework for the ColdFusion language (supporting Lucee & Adobe ColdFusion engines). An ideal platform for building bespoke or tailor made solutions.

Home Page:http://www.farcrycore.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

No admin webtop interface via content type

asimakos opened this issue · comments

Hello!

I have deployed successfully a content type (appeal) to my COAPI types, where the appropriate MYSQL tables were also created successfully.

appeal

Unfortunately i can not create the Admin webtop interface via scaffold button as exactly mentioned in your Wikipedia developer's guide section.

admin

Any idea what columns i have to choose in order to proceed successfully or what else i have to do as i have created the following fields via content type class in my project types directory.

class

Regards

The scaffold functionality might be slightly out of date, but it's relatively easy to do this by hand as it's only doing a couple of things; creating a webskin to manage the content type using ft:objectadmin and then adding it to the webtop navigation.

In your project's "webskins" folder create a folder named the same as your content type "appeal", and inside that folder create a "webtopBody.cfm". If you refer to core/webskins/types/webtopBody.cfm you'll see what a generic implementation looks like, you can copy that file as a starting point.

Then in your project folder you'll need to create a "customadmin" folder, and any .xml file in there will be treated as a webtop XML file. To add an item to the webtop inside the Content tab you could do something like this;

<?xml version="1.0" encoding="utf-8"?>
<webtop>
	<section id="content">
		<subsection id="mycontent" sequence="100" label="My Content">
			<menu id="mycontentgroup" sequence="10" label="My Content Group">
				<menuitem id="appeals" sequence="10" label="Appeals" typename="appeals" />
            </menu>
        </subsection>
    </section>
</webtop>

The typename="appeals" is your content type and by default it will render the "webtopBody" webskin of that content type. If you had another webskins for that content type that you wanted to add to the navigation then you can provide the
bodyview attribute to specfic the webskin, e.g. if you had some import functionalty you might have another menu item with bodyview="webtopBodyImportAppeals".

Hope that helps.

Fortunately again scaffold button finally worked without having to write all that stuff by hand and thus make some severe errors. So i got the following webtop section.

menu

by getting appeal.xml (customadmin/customlists/appeal.xml)

appeal

Despite all these, i get the following screen error in debug mode.

error

Regards

Unfortunately there is no webtopBody.cfm (projects/chelsea/webskin/appeal/webtopBody.cfm), except only customadmin/customlists/customadmin.xml - appeal.xml via scaffold button. So i follow your advice in order to create only webtopBody.cfm with the following code

<cfsetting enablecfoutputonly="true">
<!--- @@displayname: Default Webtop Body --->

<cfimport taglib="/farcry/core/tags/formtools" prefix="ft">

<ft:objectAdmin
	typename="#stObj.name#"
	columnList="all the properties listed in appeal.cfm except aDocs ? "
	sortableColumns="all the properties listed in appeal.cfm except a Docs ?"
	lFilterFields="label"
	sqlOrderBy="datetimelastupdated DESC" />


<cfsetting enablecfoutputonly="false">

But i need to have got access to aDocs property via custom content GUI webtop (https://we.tl/t-OHlO8Cm4cI) either for create or edit action. Is that right or not?

Regards