Is it possible to generate a local, private toctree in Sphinx? - restructuredtext

I want to generate a toctree, within a page, that will list a certain set of pages. However, I don't want it to add that list of pages to the main toctree hierarchy (and therefore the sidebar).
I have a multi page documentation set with a structure like this :
A.rst
B.rst
C.rst
D.rst
E ---- E1.rst
E2.rst
F ---- F1.rst
F2.rst
I have an index.rst which includes a single master toctree directive, and E1 and F1 contain the master toctree directives for each of their folders; and all of that works fine.
The toctrees in index.rst, E1.rst and F1.rst are all marked as hidden, so that they don't show on the pages themselves, but they do show on the main table of contents sidebar (this is defined using the includehidden option).
What I want to do is to have a local toctree within my B.rst document which lists out these documents :
C
D
F1
In other words a list that pulls together a set of documents which have different logical connection or common thread, separate from the primary organization of the documents. However I want this list to only appear on the B page - and not appear on the main toctree sidebar.
I know I can use a simple bullet list, but then that ignores the topics and sections that might exist in C, D etc, and also will have different classes applied for styling.
Is there a way I can build a dynamic hierarchical document list which only appears within, a document and doesn't get included in the main toctree?

Related

List not shown in harmon.ie due to view threshold limit

I get the error "The attempted operation is prohibited because it exceeds the list view threshold enforced by the administrator" in harmon.ie for a list with document sets. I can search for a specific document set and that set is visible in harmon.ie.
The list contains 12000+ items and the view is working fine in the library. If I create a view with only 5 document sets it still cannot be shown in harmon.ie.
How do I get the list to be visible in harmon.ie?
Make sure to download our latest 6.4 version from our web site. Unset option "Load items by Date modified (start with most recent)" and make sure to define a default view selecting less items than the List view threshold. The fields selected in the view must also indexed.
----Jean

Creating a list out of single entities

2sxc question. I have a lot of single entities of a content type that I want to combine into a list. Essentially, I have four columns and each column has an individual 2sxc content module in it. The column layout is controlled by DNN content panes. What I want to do is create a list template for that content type and add those individual items to the list. The columns would be created in the list template dynamically.
Is this advisable, or am I better off just recreating the content and using a new list template. If it is feasible, what steps would I have to take to make the conversion.
Thanks
This is very easy. The only question is if you want to manually choose which items to show in the list, or if you want to query it like a DB.
Manual approach: create a new template, say it's a list, and you're ready to go. You'll have to add "demo-items" and then "replace" them with the real one, so the initial setup has a lot of clicking.
Query-approach: create a new template, but then loop over the App.Data["Type"] instead of the Data["Default"]
ok?

Child Content Type (Drupal)

I need to create two content types (Call List and Call Announcements), in Call Announcements there are 5 fields, in Call List there are 12 fields but 5 of them are mutual with Call Announcements, I do not want to create 2 different content types (Call List, Call Announcements) because when the user create a node, he should be able to choose where the node is shown (in Call List, in Call Announcements, Both).
(Call List and Call Announcements should be in the same database table)
How can I do these?
http://i.stack.imgur.com/LAgXM.png
You can create a single content type containing all the fields.
After that add a field with checkboxes with the options like, "show on call list" and "show on call announcements), This extra field can be used to decide how the create/edit/view behaves.
When Creating/Updating content.
Now you may go ahead and install conditional fields, if you want to conditionally show some field based on the values of checkboxes selected.
When viewing content
Use views to display the list. Here you can decide what is shown in the list by filtering the list by the checkbox values. As a bonus extra views would help you decide what fields need to be shown to the user.

What does Managed="0" in List view XML mean?

I've written a Data Extender class and editor extension that properly displays a few additional columns for items as you browse lists in the CME (folders and structure groups). I had to register my class to handle commands like GetList, GetListSearch, GetListUserFavorites, and GetListCheckedOutItems.
What I've noticed is that the code gets run even when a list of say, schemas is loaded for a drop-down list in the CME (like when creating a new component and you get the list of schemas in a drop-down). so, even though my additional data columns aren't needed in that situation, the code is still being executed and it slows things down.
It seems that it's the GetList command called in those situations. So, I can't just skip processing based on the command. So, I started looking at the XML that the class receives for the list and I've noticed when the code is run for the drop-downs, there's a Managed="0" in the XML. For example:
For a Structure Group list: <tcm:ListItems Managed="64" ID="tcm:103-546-4">
For a Folder list: <tcm:ListItems Managed="16" ID="tcm:103-411-2">
But for a Schema list: <tcm:ListItems ID="tcm:0-103-1" Managed="0">
For a drop-down showing keyword values for a category: <tcm:ListItems Managed="0" ID="tcm:103-506-512">
So, can I just use this Managed="0" as a flag to indicate that the list being processed isn't going to show my additional columns and I can just quit processing?
Managed value is representation of what items can be created inside OrganizationItem:
64 means you can create pages
16 means you can create components
10, for example would mean you can create folders (2) + schemas (8)
518 - folders (2) + structure groups (4) + categories (512)
The value is 0 for non organizational items.
Value depends on the item itself (you can't create pages in folder, for example), as well as on security settings you have on publication and organizational item
Unfortunately CME can't offer right now that kind of granularity level to allow you to tell in a data extender where a particular WCF API call is coming from. Our WCF API is not context aware yet. It may change in the future.
Trusting Managed="0" is not a great idea.
The reason for that is the model lists are client cached per filter. In the current design the filter has CM related data and nothing related to the context the request is being fired from.
Typically the client user interface is reusing cached model data whenever is possible. For instance the same model list could be used in the CME dashboard and a drop down control placed into some item view, but with different xml list definitions: the first one will have more columns defined in the list definition than the latter. They are basically different views of the same data.
Therefore you may want to think of different solutions for your problem.
Now... where is the data behind those additional columns is coming from? Is it Tridion CM or a third party provider?
Sometimes the web server caching may provide an acceptable way to improve the response times. But that's the kind of design you should evaluate and decide upon.
I think you would have a more robust solution if you read the ID of the list, and only execute your code for lists of type 2 and 4 (Folders and Structure Groups respectively). but that won't help you with search views etc.
From previous experience and what User978511 says the Managed attribute is an indication of item types that can be created from the context of that list.
Unfortunately that means that the Managed attribute may well be 0 for any user that doesn't have sufficient rights to create items. E.g. check what Managed is in a Structure Group for a user that isn't allowed to create Pages or Structure Groups. It may well be 0 in that case too, meaning it is useless for your situation.
Update
You may be able to reach your goal better by looking at the columns parameter:
context.Parameters["columns"]
In a few tests I've run I get different values, depending on whether I get a list for the main list view, the tree or a drop down list.
543
23
7
Those values are a bit mask of these constants (from Constants.js):
/**
* Defines the column filter.
* Used to specify which attributes should be included in XML list data.
* #enum
*/
Tridion.Constants.ColumnFilter =
{
ID: 1,
ID_AND_TITLE: 3,
DEFAULT: 7,
EXTENDED: 15,
ALLOWED_ACTIONS: 16,
VERSIONS: 32,
INTERNALS: 64,
URL: 128,
XML_NAME: 256,
CHECK_OUT_USER: 512,
PUBTITLE_AND_ITEM_PATH: 1024
};
So from my limited testing it seems that drop downs request DEFAULT columns, while the main list view and the tree both have ALLOWED_ACTIONS in there. This makes sense to me, since the user gets can interact with the list items in the tree and list view, while they can only select them in the drop downs. So checking for the presence of ALLOWED_ACTIONS in the columns parameter might be one way to reduce the number of places where your data extender adds information.

Drupal Views - Relating 1 Node to N Other Nodes using CCK, NodeReference and Arguments

I am working on a Drupal setup and have run into a slight issue relating nodes together using Views.
Essentially what I want to be able to do, is while editing Node A, have a multiple select node reference field to indicate it is related to Nodes B, C, D. When I view the contents of Node A, it should display the appropriate view for each of those nodes directly on Node A.
I worked through This Tutorial on using arguments in views, but it seems to be doing things in reverse of what I want. This method requires me to set the relationships in Nodes B, C and D to point to Node A instead of having Node A point to Nodes B, C and D. Setting the relationship in 3 different places instead of 1 location seems counter-intuitive and will be a pain to manage when we start applying this method to a bunch of different nodes.
I selected the following options for the argument:
// this is my multiple-select NodeReference relationship field
Content: Linked Highlight Boxes (field_linked_nodes)
Title: [blank]
Breadcrumb: [blank]
Action to take if argument is not present: Provide default argument
Default Argument Type: Node ID from URL
Validator: <Basic Validation>
Action to take if argument does not validate: Hide View / Page not found (404)
Wildcard: all
Wildcard title: All
Allow multiple terms per argument: checked
Exclude the argument: not checked
Let me know if you need any more information or explanation. Any help will be greatly appreciated.
Your are going to want the Node Relationships module: http://drupal.org/project/noderelationships. This will give you the back relationships that you want.

Resources