Orchard content items not appearing in dashboard - orchardcms

The context for this is Orchard 1.8.1 running on an Azure Website (not cloud service) with Azure database.
I've defined a ContentType via the admin UI. The 'Class' type is creatable and not draftable, and contains Autoroute, Body, and Title parts, along with Numeric and Taxonomy fields. The Taxonomy is defined with its terms.
Items can be created via the 'New' menu on the Admin page or via 'Create New Class' from the Content Definition list. I've created a Query and Projection to display all items of type 'Class', and that shows all of them properly on its front-end page.
The problem is in the 'Content' section of the admin page. If I create the item via the 'New' menu, it doesn't appear in the Content listing. If I create it via 'Create New Class' in the Content Definition list, it does appear in the Content listing. But all of them show up in the query.
I've exported the items and reviewed the XML ... nothing different. The following is an item that appears in the Content list:
<Class Id="/alias=american-history" Status="Published">
<NumericField.Credits Value="1" />
<TaxonomyField.Dicipline Terms="/alias=subjects\/social-studies" />
<BodyPart Text="<p>This American History course will integrate both Social Science skills with historical content of America and the United States from the early 1600s to the present, as well as education in government and economics. There is a strong emphasis on college preparation, civic participation, and integration with research and technology. Students use will a variety of resources and activities to explore major themes, including the changing face of American society and the United States&rsquo; changing role in the world.</p>" />
<AutoroutePart Alias="american-history" UseCustomPattern="false" />
<TitlePart Title="American History" />
</Class>
And this is an example of one that does NOT appear:
<Class Id="/alias=economics" Status="Published">
<NumericField.Credits Value="1" />
<TaxonomyField.Dicipline Terms="/alias=subjects\/social-studies" />
<BodyPart Text="<p>The introductory economics course has a strong emphasis on personal finance. Students learn the importance of budgeting and how, through a variety of financial instruments, to make money work for them. Students also learn how the stock market operates by participating in a virtual stock game. In this context, students are introduced to the concepts of stock ownership, the commodities market, supply and demand and the different types of business structures. Students learn how to complete various tax forms and the how's and why's of the American tax system. Students will read the book, Freakonomics, and gain insight on how to look at problems from an economic standpoint. Finally students learn about the different types of economic systems, the circular flow of money through the economy, and government intervention in our economy.</p>" />
<AutoroutePart Alias="economics" UseCustomPattern="false" />
<TitlePart Title="Economics" />
</Class>
I started digging through the database to see if I could find the problem, but quickly got lost.
Any idea where I might start looking for the issue? I'm thinking that, if this were a bug, it would have manifested well before I found it and would be causing a hue and cry, so I'm thinking it's something in my setup somewhere.
Thanks for any help I can get on this one.
-- Michael

You need to add the common part for it to appear in the contents list because it needs that to order by date and probably some security stuff related to who owns the content, though I'm not sure about that one :)
Update from Bertrand: You also need to mark the content type as Listable in the Content Type definition.

Related

How to create a Form-Specific Help menu in Modern UI?

One of the standing out features of Acumatica's Modern UI is the Form-Specific Help menu, which is opened when you click the Help button while viewing the majority of forms:
I wonder how big is the effort to create Form-Specific Help menu for a custom screen?
As described in the Acumatica ERP documentation, to link a reference article with a particular screen, you should specify the Article ID based on the Screen ID of the form, replacing periods with underscores. For example, if the Screen ID is AP.10.10.00, the ID of its reference form must be specified as AP_10_10_00.
A very similar concept is used to link form-specific help with a particular screen. If you take a quick look at the Wiki Site Map (SM.20.20.10), you should notice the Form Quick Reference node under User Guide:
The Form Quick Reference node in its order contains a number of sub-nodes representing different modules of Acumatica ERP. And by checking the list of Wiki articles included into the Sales Orders (User Guide -> Form Quick Reference -> Sales Orders), you can easily tell, that form-specific help menu is nothing more than a Wiki article linked to a particular screen. To link form-specific help with a particular screen, you should specify the Article ID based on the Screen ID of the form, replacing periods with underscores and adding _NAV in the end of the Article ID.
The content of a Wiki article representing form-specific help is usually quite simple:
==Procedures==
[HelpRoot_User\SO__How_Create_Sale_Order|To Create a Sales Order (SO)]{br}
...
[HelpRoot_User\SO__How_Process_RM_Order|To Process Authorized Returns (RM)]
==Concepts==
[HelpRoot_User\SO__con_Order_Processing|Sales Order Processing Options]{br}
...
[HelpRoot_User\SO__con_Order_Types_for_Returns|Predefined Order Types for Customer Returns]
==Form Reference==
[HelpRoot_User\SO_30_10_00|Sales Orders] ([~/?ScreenId=SO301000|SO.30.10.00])
==Help Dashboard==
For the majority of standard Acumatica ERP screens, form-specific help consists of up to 4 sections:
Procedures
Concepts
Form Reference
Help Dashboard
Also keep in mind, the Procedures section is considered optional and can be easily excluded from some of form-specific help menus.

How can I display the Author's bio on the Author's View page?

I'm new to TPL (Smarty) but have been using PHP for years.
Is there a roadmap/guide for customising OJS?
As far as I understand this would involve a PHP script to retrieve/assign the information and then a TPL script to actually display the information.
Thanks
Petras
For references, have a look at the OJS Quick Reference and the OJS Technical Reference, both available here: https://pkp.sfu.ca/wiki/index.php?title=OJS_Documentation
By "Author's View Page", I'm assuming that you mean the pages with a URLs like http://.../index.php/[journalPath]/authors/view. Modifying these to include an author biography may be difficult because of the way OJS stores author records.
Each article may have several authors, and author records are not disambiguated -- for two articles with "Joe Smith" as an author, there will be two different entries in the authors table. Currently on the author listing the disambiguation is done by matching the same first name, last name, affiliation, and country. (See pages/search/SearchHandler.inc.php in the authors function for the code that does this.) Many author records may match this set of data, each potentially with its own biography data.
The reason the data is stored this way is to permit users' identities to evolve -- they may change last names, move between institutions, etc. -- without affecting the metadata of existing publications, which should not change.
If you want to determine a single biography statement, you'll need to decide how to pick a bio statement from among potentially many that match the set of data described above. Once you've done that, displaying it will be as simple as assigning the value to the template:
$templateMgr->assign('myVariableName', $somePhpVariable);
...and then using that variable in the templates/search/authorDetails.tpl template:
{$myVariableName|strip_usnafe_html}
FYI, our future plans include using third-party identifiers such as ORCiDs to disambiguate author identities; however, thus far our ORCiD integration is pretty limited. In the current release it's possible for users and authors to enter their ORCiDs so that they're stored with user and author records.

Requesting Advice: Categorize Account Entity

I have recently inherited a very messy Dynamics CRM system from my predecessor. I want to clean up the way our company navigates around Accounts. At the moment, there are 3 views and one form with about 2000 (exaggeration) lines of javascript code!
We categorize accounts into three types; TypeA, TypeB, TypeC. This is controlled by an Option Drop Down. Once selected, the screen hides/shows depending on it. This has meant we have a very wide AccountExtensionBase table. I am accepting I will have to live with this as I am have been led to believe that building a 1..1 extension is not as easy as it seems?
What I would like to do is change the 'Workplace -> Customer' menu on the right hand side of CRM. I'd like to add three clickable options so it would read
Customers
Accounts
TypeA
TypeB
TypeC
Contacts
Upon clicking, for example, 'TypeA' it would take the user to the 'TypeA' accounts which are filtered by a pre-defined view. Then, any request for the Account Form from this view would redirect the user to a specific 'TypeA' form, which I have yet to create.
I have read this article here Crm 2011 - How to set a default form depending on attribute value (without using Javascript)? which is a good example of how to re-direct the forms. However, I am unsure how to handle this from a 'New' request, as the drop down is not yet populated.
Is there a way of building this concept cleanly in CRM? I am finding it hard to get any decent Google results as I am unsure of what terminology I should be using.
Any help or links to suitable guides would be hugely appreciated.
Thanks.
I think these are the droids you are looking for:
http://www.powerobjects.com/blog/2013/03/08/displaying-filtered-view-in-site-map-crm-2011/
Granted it is for CRM 4, however it may work in 2011.
You might also look at:
http://mscrmtools.blogspot.com/2011/06/new-tool-sitemap-editor-for-microsoft.html

Orchard Create Projection or Search Based on Filtered Dropdown Selections

I have, what I think is, a simple feature that I am trying to add to my Orchard (1.6) site, but I can't find any tutorials or instructions on how to do it. I have a custom type called "Office" and each office has a custom field called "State" indicating which state the office is in. I actually designed my Offices as a custom part in code with specific properties such as State on it, but I "think" it's the same as if I added the State through the Admin interface as a field on the Office content part.
Now, I can create a basic projection to show all the offices with a simple filter of "Content with type Office" to display all offices. However, what I want to do now is to have a drop down list at the top of the page that says "Filter by: [-SELECT STATE-]" with a list of all 50 states. When the user selects a state, the page should refresh and display just the offices in that state.
This is where I'm stuck. Should I do this through the code, or can I do this through the Admin UI? If through the code, should I model it after the Orchard.Search module (which I tried to do, but I am completely lost). If I can do it through the UI, do I use projections? If so, do I have to create 50 separate projections (one for each state)? That seems extremely time consuming to create and maintain.
Any help is GREATLY appreciated!
FYI, the site at http://ktowneric.com/listings/search (which uses Orchard) is very similar what I am looking for, and the developer stated he used projections, but I can't seem to figure out how he did it.
You can definitely use a projection. If you notice when you use the search function on the page you referenced, the inputs are formed into query string values. You can use tokens to grab the values from query strings to use in your projection filter. For example, if you're using fields as you stated, then you just add a filter for that field and in the value field use {Request.QueryString:State}. Or, replace "State" with whatever key you're using for the query string value.
That solves your projection issue. You will need to build a search form that would look something like this...
<form action="/search-results" method="Get">
<select name="State">
<option value="OH">Ohio</option>
...all the states...
</select>
<input type="submit" value="Search" />
</form>
"/search-results" could be a projection page or any content that has the projection widget present. You could build the form as a widget that you can place somewhere, or for testing purposes, you could just paste this html into an html widget to try it out.

Meta Tags in Google Site Search

I'm planning on implementing a google site search (and paying for it so I can get access to the XML). One thing I am wondering about is the possibility to use custom meta tags in it.
I've heard yes from colleagues but nothing confirmed. Searching for an answer has given nothing (maybe because you cant?)
Anybody knows?
Edit: I want to be able to retrieve those meta tags from the search result to be able to provide different styling for different types of pages.
Yes, you can do this, although not, as far as I know, using meta tags. Instead, google allows you to put custom attributes inside your HTML, which can then be retrieved from the XML you get back from Google Custom Search results API.
Take a look at
http://code.google.com/apis/customsearch/docs/snippets.html for more info on how this works. The Structured Data section outlines the specific ways you can stick custom metadata inside your page so Google will hand it back to you along with each search result. The easiest seems to be a PageMap, which is an HTML comment inside your HEAD, like this:
<!--
<PageMap>
<DataObject type="document">
<Attribute name="title">The Biomechanics of a Badminton Smash</Attribute>
<Attribute name="author">Avelino T. Lim</Attribute>
<Attribute name="description">The smash is the most explosive and aggressive stroke in Badminton.
Elite athletes can generate shuttlecock velocities of up to 370 km/h.
To perform the stroke, one must understand the biomechanics involved,
from the body positioning to the wrist flexion. </Attribute>
<Attribute name="page_count">25</Attribute>
<Attribute name="rating">4.5</Attribute>
<Attribute name="last_update">05/05/2009</Attribute>
<Attribute name="thumbnail">http://www.example.com/papers/sic.png" width="627" height="167" />
</DataObject>
</PageMap>
-->
If you absolutely must use META tags, the Bing Search API does support indexing all meta tags whose NAME property starts with "Search.", e.g.
<meta name="Search.MyCustomProp" content="Hola mi amigo Google, I want my META!">
Then in the Bing Results API you can pull out all these values using the WebResult.SearchTag property. When issuing the request, you'll either need the WebRequest.SearchTags Property or you can just add text to your search query, e.g. poodle meta:search.MyCustomProp(amigo) searches for the word "poodle" on pages where the search.MyCustomProp meta tag contains the word "amigo". Using the Bing API is free as long as you stay under 7 queries per second and adhere to some other restrictions detailed here.
Sorry to be talking so much about Bing, feel free to ignore that part-- but I have had reasonably positive experiences using the Bing API at a previous job.
Can you detail more about the meta tags you want to use. You can add meta tags and it should not matter to Google.

Resources