core
core copied to clipboard
No admin webtop interface via content type
Hello!
I have deployed successfully a content type (appeal) to my COAPI types, where the appropriate MYSQL tables were also created successfully.
Unfortunately i can not create the Admin webtop interface via scaffold button as exactly mentioned in your Wikipedia developer's guide section.
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.
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.
by getting appeal.xml (customadmin/customlists/appeal.xml)
Despite all these, i get the following screen error in debug mode.
Regards
You may need to edit the customadmin .cfm that was created for your appeal content type and remove aDocs from one of the attributes passed into ft:objectadmin.
On Mon, 31 May 2021, 1:43 am Konstantinos Asimakopoulos, < @.***> wrote:
Fortunately again scaffold button finally worked without having to write all that stuff by hand and thus make some severe error. So i got the following webtop section.
[image: menu] https://user-images.githubusercontent.com/15226087/120110454-35eda300-c176-11eb-89b8-99c3f523747e.png
by getting appeal.xml (customadmin/customlists/appeal.xml)
[image: appeal] https://user-images.githubusercontent.com/15226087/120110575-a4326580-c176-11eb-8d03-c1ff678e0852.png
Despite all these, i get the following screen error in debug mode.
[image: error] https://user-images.githubusercontent.com/15226087/120110601-cc21c900-c176-11eb-975e-83794b07d3ac.png
Regards
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/farcrycore/core/issues/101#issuecomment-851019580, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACVQDOGHHQ4A5GM676C6PDTQJMKVANCNFSM45ZH4CNA .
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