Is there any way to manage the shape templates other then the default location (Such as placing them inside sub-folders)? - orchard-modules

I'm developing an Orchard Core site and would like to place the shape templates into some sort of folder structure, if possible?
See example from tutorial:
So would it be possible to place the ColorField shape templates into a ColorField folder and the PersonPart shape templates into a PersonPart folder?

Not a direct answer to your question, but I was having problems getting Razor pages in a ~/Views/Shared folder to display as a shape.
JTKech replied here to me https://github.com/OrchardCMS/OrchardCore/issues/6376?notification_referrer_id=MDE4Ok5vdGlmaWNhdGlvblRocmVhZDkyNDcxMjQ2NDo3MjcwNjE%3D#issuecomment-640995088. Basically, OC looks at certain folders ("Views", "Views/Items", "Views/Parts", "Views/Fields", "Views/Elements") to display shapes.
That being said, there was a way in O1 to change what folders were searched, and I believe there is such a way in OC but haven't been able to find it.
In the end, you may want to place Color Field and PersonPart into ~/Views/Parts until you find a better solution to suit your needs.
Another option is to create a Theme and place those files within a similar structure there. I tend to do this with front-end views, keeping the Admin/Edit pages in my module. But there's nothing to stop you from doing them either way. Good luck.

Related

How to to reuse content between two DITA maps and keep the folder structure

I am using Oxygen XML Author and I have two maps that have a lot of similar content. Right now, the content is not reused, but it would be great to make it reusable. The maps are called InstallGuide.ditamap and AdminGuide.ditamap they are stored on the disk with the following hierarchy:
common/
InstallGuide.ditamap
Product/
ProductFeatures/
MainProduct/
AdminGuide.ditamap
Is there a way to put a new parent map to disk root and include my other two maps in it and make content reusable? Right now if I try, the maps are included, but only as non-editable references so I can't set up any reuse and can't set profiling attributes.
Why do I need profiling?
Since the maps are two different documents I want to be able to profile them from the parent map. But I want to also be able to reuse content from one map to another. Moreover, I would want to keep the folder structure unchanged. Is that possible?
I can't get my head around the solution for my "wants". Maybe someone can propose a better way to achieve the goal, I would appreciate that.

Can Emmet Be Used to Create FXML?

I have a scalaFX app that currently has its views created programmatically. I am wondering if I can use the Emmet tool to create FXML (particularly ScalaFXML) because I want to recreate my views in ScalaFXML to separate my views from my controllers more effectively. I have searched the internet and cannot find out if this is possible. So far I have only used Emmet for HTML. Thanks in advance for the help!
I have been looking around for something for PrimeFaces; I had trouble finding anything. I guess maybe it's because people who are using it are actually writing "normal" HTML with JS frameworks.
The good news is, it's completely (and easily!) customizable: just find the installation directory, and edit the "snippets.json" file, or create a new one called (for example) snippets-scalaFX.json. Mine on a Windows 10 machine, installed as a plugin for NPP, was C:\Program Files (x86)\Notepad++\plugins\EmmetNPP\emmet\snippets.json.
It's pretty obvious once you get in there, but inside the "snippets" object just add some more fields for yourself. For example, to make a PrimeFaces commandButton tag I added:
"pc": "p:commandButton"
You can use $0 or ${<placeholder text>} to define tabstops for expanded snippets, and | to define the caret starting point.
Full docs on editing snippets are here.

Teamsite component or template

I was wondering if page templates can be built instead of individual components in Teamsite 7? I've seen other cMS systems where it is just a page template that has lots of functionality built I and you can "switch" on and off elements that you want to display instead of having to drag components onto a page? Is this possible?
Old question, but since I just came across it:
Yes, TeamSite supports templates (.template) files which can be partial or full page templates. The default location is iwadmin/main/livesite/template.
I recommend downloading the developer guides from Autonomy's web site for detailed information.
Templates in teamsite/livesite is like a bag that can contain components. But in order for a functionality to be developed in teamsite/livesite we need to create components. certainly we can avoid dragging and dropping components in each page by creating templates and dropping components within it for once. Keep in mind templates are bound to layouts. for each type of layout we need to create a template. Please have a look at TS_7.3_SiteDeveloper_rev1, Chapter 5.
Yes, you can create templates instead of dragging components.
Since, TeamSite supports templates (.template) files which can be partial or full page templates and resides at location : iwadmin/main/livesite/template.
So, whenever you try to create a new page everytime the HTML code required for that page gets automatically added with the template and layouts you selected.
But, again this is not good since you can have any number of templates you need but this could create confusions at times when you try to create a new page since you will need to remember every template name and contents that you will need for a particular page so it's better to have small lists of templates and layouts since then we can say that there is reusability in our application/website which we are going to develop using Teamsite and Livesite.
Please vote the solution if its helpful.
Thanks!

How to extend Alfresco Share existing activity list dashlet with my own activity type?

In Community 4.0.a, I'm posting my custom activities in the repo following this: http://wiki.alfresco.com/wiki/3.0_Activities_Developer_Guide
I have defined my own activity type, with custom bundles and pagelink to display custom needs in the activity dashlet.
But I face an issue, I need to specialize the output based on the activity-type in a similar way of what is done already in activity-list.get.js in the specialize() function.
I can't hack the js cause I'm packaging things in my own amp for Share.
What is the best way to do it? Is there some kind of extension point or do I need to override completely the dashlet?
The old way (3.x) to change the behaviour of a webscript controller is to copy the code and overwrite the Javascript by placing it under web-extension: alfresco/web-extension/site-webscripts/org/alfresco/components/dashlets/activity-list.get.js. There you can modify the specialize() function or whatever you need to do.
All files you place in the alfresco/web-extension/site-webscripts folder will replace original files in the share.war WEB-INF/classes/alfresco/site-webscripts classpath. Best practice is to place your customizations in the tomcat/shared/classes/alfresco/web-extension folder so you don't need to modify the WAR file.
Alfresco 4.0 provides a new way to change the javascript controllers of a webscript. You can add additional Javascript code that will run after the original code. This is preferable because you don't need to change original code and you can upgrade more easily later. To use it you need to get familiar with the new Share extension modules concept. See David Draper's Blog for more info on that.

Using custom styles with Basic4Android

As a follow on to the hide activity questions here, I started looking through the Andoid documentation for more information on styles and themes and found it is possible to apply different themes for different API levels.
With this I can get my transparent activity on API levels that support it properly.
What I'd like to know is, is it safe to play with the styles within the Basic4Android environment, or will it comeback to bite me later on?
The xml has to be stored in res/values or res/values-v(API level) which are deleted on compile unless made read-only. I just wanted to check if this was to stop these being changed for a reason, other than keeping the app tidy?.
Edit:
I assume some things that it is possible to put in these files would overwrite or be overwritten by settings in the Designer.
Steve
I don't see any problem with using styles. Make sure to set your xml files to be read-only.
The designer doesn't change anything except of creating the bal files.