Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No admin webtop interface via content type #101

Open
asimakos opened this issue May 30, 2021 · 4 comments
Open

No admin webtop interface via content type #101

asimakos opened this issue May 30, 2021 · 4 comments

Comments

@asimakos
Copy link

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

@justincarter
Copy link
Member

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.

@asimakos
Copy link
Author

asimakos commented May 30, 2021

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

@justincarter
Copy link
Member

justincarter commented May 30, 2021 via email

@asimakos
Copy link
Author

asimakos commented Jun 3, 2021

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants