Orchard: Master-Detail Pages - orchardcms

This is so embarrassing... things I've done literally dozens of times in classic ASP and ASP.NET...
I have 1:n master-detail tables (eg. Departments, Jobs) where
Department: ID
Marketing : 1
Sales : 2
HR : 3
and
Job : DepartmentID
Job 1 : 1
Job 2 : 2
Job x : 1
so each Department has 0 to n Jobs listed.
Now I only want a page that lists Departments. (which are links to another page)
This other page obviously presents all jobs in the chosen Department.
"MASTER PAGE": .--> "DETAILS PAGE after click on Marketing"
|
Departments: | Jobs in Marketing
Marketing --------------' Job 1
Sales ---> Job x
HR --->
Easy enough... but I have not the faintest idea how to create this in Orchard.
I have set up Taxonomies, I tried Queries...
like Taxonomy
Department
Marketing
Sales
HR
I set up a ContentType "Job", added the Tax-Field "Department" - which is fine.
I can add {Content.Fields.Job.Department}/ to Autoroute - but it does not show up in the saved Job. (slug is always .../Title-of-Job) not (.../Marketing/Title-of-Job)
And furthermore, I only get all my Jobs listed on a URL like .../Department -- whereas I would like to get my Departments listed, not the jobs within (so this should be the "Master-page" which links to .../Department/(eg)Marketing and this one lists the jobs.
could someone please give me a detailed guide - or link - on how to accomplish this basic and trivial task for a data-driven website - in ORCHARD !?

Related

How to Customize netsuite task manager

how to customize the task manager in netsuite which is using in a sales company
in netsuite task manage i can assign a task to any other employees
but when i assign a task its showing to everyone else
i need to assign my task to a person and only he can view that task none other dont need to see the task
also i need to assign a task in the name of my department to another department
actualy
i need to assign a task to another one
(that is one to one assign)
i need to assign a task to a person in the name of my department
(Many to one)
and from my department to another department
(many to many)
To answer one of the questions: "I need to assign my task to a person and only they can view that task." For this check [X] PRIVATE TASK in the Primary Information section.

Assign Task to a parent (User Story) in TFS via excel

I imported a TFS query to excel to add a bunch of tasks. That part worked well. Now I just need to attach them all to their appropriate user stories (parent). I tried a bunch of different options in "column options", but none of them let me choose the task's parent. Is this even possible through excel?
You can achieve that by adding parent/child linked backlog items and tasks, please see Bulk add or modify work items with Excel for details.
In you case, you have bulk added the tasks to project,you need to link parent user stories by following below steps:
Select any task and link it to its' parent story (to generate the tree level title in query).
Create a Tree of Work items query like this:
Open Excel,New list > Select the created query above > OK
Edit the query in excel, move the Tasks title from Title1 to
Title2 accordingly based on their appropriate user stories.
Click Publish, check the Parent link in backlog.

Add users to an automated SharePoint workflow

I have a SharePoint Designer workflow that starts when an item is created. If an amount is X, the X approval workflow starts. If the amount is XX, the XX approval workflow starts. If the amount is XXX I need the XXX workflow to route to the first approver who can then add additional approvers at his descretion.
The first 2 workflows are fine, how do I accomplish the third?
Your conditions are your amounts. i.e. X. Don't use an out of the box approval workflow. Custom design a list workflow in SPD.
So something like this
Click here to view an example of what I'm talking about
You could also take a look at the following link on how to go about setting this up
http://plexhosted.com/billing/knowledgebase/226/How-to-create-a-simple-approval-workflow-in-SharePoint-Designer.html

Show Solr Autosuggest results with types/categories

we are configuring solr for an e-commerce site which features a range of products across multiple categories and brands. In addition to that there is also a number of landing pages which can be reached through the search. So overall, we have 4 types of possible results, I'll use an electronics site as an example:
Categories (i.e. "Smartphones")
Brands (i.e. "Samsung"
Products (i.e. "Samsung Galaxy S4")
Pages (i.e. "How-To Guide to your Samsung")
What we would like solr to do is
a) show those things in autosuggest (right now it shows the first three, but doesn't show pages as they aren't part of the product catalog through which it searches)
b) show the "type" of the result in the box next to the result. To illustrate, if I would type "Sam", the autosuggest box would look something like this:
Samsung Brand
Samsung Galaxy S4 Product
Samsung Galaxy S5 Product
How-To Guide to your Samsung Page
Android Smartphones Category
Particularly the last point is really important and we couldn't find any way to do this yet. Any help would be greatly appreciated.
You can create a separate core for all the stuff you want to be able to auto complete on, where you keep both the type and the value. That way you get the flexibility of adding new auto complete features later, and you'll avoid introducing a wide set of different documents in your main core.
Another option is to add a type field to your main schema, and create documents for Page objects as well (depending on how you create the existing auto complete categories - if you have three different types of documents in the index already, it would be quick to add a new field that just contains the type of the document as well).

Get the pages of a multipage meeting workspace

I currently do some testings on the multipage meeting workspace template to check whether it fit our needs to be the base template for our projects.
As you might know, a multipage meeting workspace is designed to be able to manage several dates within a single workspace and to display either pages that are only related to a certain date or pages that should appear on every date.
If you examine a multipage meeting workspace with SharePoint Designer you can see that there is a library which contains all the pages of the workspace. Pages that are displayed on every date are stored in the root folder, pages that are only displayed on single dates are stored in folders which are named with the according date.
So now we come to my problem. In order to set the permission for a single page that is displayed on each date, I iterate over the page library to find the page I want to change the permissions on. Strangely, the ListItemCollection of the library pretend to contain the number of pages I expected it to contain. But when I then iterate over the collection it only returns the pages that are attached to the actual date. Neither does it return the pages which should be displayed on every date nor the pages for the other dates.
I have already tried to get the pages by using SPSecruity.RunWithElevatedPrivilges() and with impersonation as the system account. I've also tried to get them via a command line application without using any context information. It seems as the behavior, that you can only get the items which are related to a certain date, is also followed by the object model.
So how could I get all pages of a multipages meeting workspace regardless of the actual date???
You can catch an event on workspace creation moment and at the event set permissions programmatically. You may want to know more about event receivers or setting permissions programmatically.
Those pages you mentioned are items added to a list called "Meeting Series"
alt text http://img22.imageshack.us/img22/8963/ss20090528181724.png
It contains following fields:
alt text http://img22.imageshack.us/img22/351/ss20090528181819.png alt text http://img22.imageshack.us/img22/7857/ss20090528181852.png
Example data from 1 item (not in tat order as columns are mentioned):
3 0x001C4383A41E441842A2A27CA249FED28F Meeting Series Recurrence 2009-05-28 18:11:20 2009-05-28 18:11:12 1073741823;#Sistēmas konts 1073741823;#Sistēmas konts 1 1 512 1.0 0 0 Recurrence Recurrence 3 100.000000000000 {A6E54DB5-3A60-464B-A9A0-D314B49C41E8} 3;#test2/Recurrence/Lists/Meeting Series/1_2.000 3;#test2/Recurrence/Lists/Meeting Series 3;#2009-05-28 18:11:20 3;#2009-05-28 18:11:20 3;#0 0x7fffffffffffffff 3;#1_2.000 3;#{6BE299E5-E81F-40A8-80B2-41494DF0353C} 3;# 3;#{965D0DB3-1AE0-4C23-B006-FB4FC1FE1AB7} 1_2.000 3 1_2.000 1_2.000 /test2/Recurrence/Lists/Meeting Series/1_2.000 http://test:10000/test2/Recurrence/Lists/Meeting%20Series/1_2.000 1_2 3;# 1 1 2 {D8839339-6DDA-48A6-B3B7-FBCA58C8B436} 2009-06-03 19:00:00 2009-06-03 19:00:00 (null) (null) (null) 0 1 (null) 0 0 0 2009-05-28 18:10:57 (null) http://test:10000/test2/Lists/Calendar, Kalendārs 2009-06-03 19:00:00
The pages for this kind of events get created only when a user tries to access them. This is by design, and the only solution I found was to try and access the page via the website (or some emulation) and then try to access them by code.
Regarding Flo's Comment, I fount the source for this on Microsoft Sharepoint 2007 Development unleashed (sams, ISBN 0-672-32903-4). on p 101 says:
CAUTION
Obtaining data from recurring meetings
can be tricky. You might encounter
situations in which your code attempts
to access a list item for a meeting
occurrence that has not yet been
provisioned in the Meeting Series
list. To ensure that the individual
instance has been created, you can
make a dummy web request to the
instance’s home page, for example:
http://server/sites/mymeeting/default.aspx?InstanceID=20061012
If you find another way, please post it It will save us lots of effort!!!

Resources