XWIKI - Changing Parents of Page (does not get updated on nav) - xwiki

I would like to know why after I edit the parent of an existing page (e.g. "Sushi" page, under "Food" space; I open that page, open edit, and change the parent from WIKI > Food > Sushi, to WIKI > Japan > Sushi), it won't change its position on the sidebar (i.e. the "Sushi" page is still under the "Food" section in the sidebar, and in the food.webhome page rather than japan.webhome page.
Can someone tell me how to refresh it or something?
Thanks.
ingSiang

(Note: Answer only applies to XWiki prior to version 7.2. Since version 7.2 the confusion should no longer appear.)
What is going on here?
The problem is caused by a confusion between two concepts, the one being the parent-child relation between pages spanning up a tree, and the other one grouping pages into spaces. In XWiki, these concepts are not related, i.e. pages do not have to be in the same space to form parent-child relationships.
The membership of pages in a given space is often noted by the <space>.<page> notation; for example Main.WebHome is the page with name WebHome in the space Main. On the other hand I know of no good notation for the parent-child relationship, so for the moment I will invent parent > child as notation, i.e.Sandbox.WebHome > Sandbox.TestPage1 means that the page with name WebHome in the Sandbox space is the parent of TestPage1 in the same space.
You can see the parent-child relationship in the small breadcrumb on top of the content section of the page just above the title. The topmost navigation, however, shows the Wiki / Space / Page membership. i.e in which wiki and space the page is. What the sidebar shows depends on which navigation panels you have installed.
Why it didn't work as expected
What you can change in the editor is only the parent-child relationship. So I assume you have a page Sushi in the Food space and the WebHome of that space as parent, i.e. Food.WebHome > Food.Sushi
After changing the parent to Japan.WebHome page, the parent-child relationship now looks like: Japan.WebHome > Food.Sushi
As for the parent of Food.Sushi (in the breadcrumbs) you should see that it is the Japan.WebHome page. However the Sushi is still in the Food Space and is listed in the navigation under the pages in the Food space.
How to make it work
To change the space membership of a page, go to that page and choose "Sushi" > "Rename" from the menu on the top (the menu that shows it "wrong" currently). On the upcoming page, type in the wanted space in the "new space" of the page (i.e. "Japan" in your case), leave the "new page" field alone and click "rename".
Afterwards the top navigation should show that your page is now in the "Japan" space, as it is renamed to Japan.Sushi

Related

Accessibility for blind people

How does the aria-current works as we need to tell the screen reader where the page it is even after user does not made any movement on the laptop. Which Aria can be used ?
Aria-current works by informing the screen reader which element is current. For example, you can use aria-current="page" on a list of navigation links where it shows by visual decoration (color or underline, etc) which page link is currently chosen. Aria-current="step" could be used if there is a visual indication of checkout steps (for example) to show which step (2 of 3) the user is currently on. Aria-current="true" could be used if there are a set of size links to show which size is currently selected.
aria-current is one of the attributes defined in the WAI-ARIA specification, meant to help people with disabilities to perceive common UI widgets that are not part of the HTML specification.
It should be used to identify the current item in a set of items and it can take several values:
aria-current="page": indicates the current page within a set of pagination. It can be used, for example, within a main pagination widget (likely in the header).
aria-current="location": indicates the current page within an hierarchy of navigation. In can be used, for example, within a breadcrumb widget.
aria-current="date": indicates the current date. It can be used, for exemple, within a date picker.
aria-current="step": indicates the current step within a set of steps. It can be used, for exemple, within multi-step wizard form.

TYPO3: login form on page + sub pages

In TYPO3, how do I get a login form to be the first rendered content element on a page and all its sub pages? I tried to check the "recursive" option but that doesn't seem to do the trick?
There are quite a few ways to set up something like this. Here's one approach:
Add a separate content section in your backend layout right above the current section.
Use slide to have pages inherit content for this section from their parent pages
Put the login form in that section on your the root page of your subtree.
This rather simple approach leaves control to the editor.
The recursive option you mentioned is very likely related to the record storage page and tells TYPO3 to look for records (here: users) in subpages of the selected page.

How do I export all pages below a page in confluence using a script

I'm capturing meeting notes in a page structure in confluence. I want to export all the meeting notes to a share drive for others to read. I've found notes on how to export a page or a space but not the pages below a page. e.g. I want everything below "Parent Page" but not anything else.
e.g.
Space
Unrelated Pages
Unrelated Pages
Parent of Parent
Parent Page
Child Page 1
Child Page 2
Child page 3
I want to drag the child pages to a share drive. I'm looking to use one of the following e.g. curl, .bat files, python, R etc.
This is on the cloud version of confluence
Go to the Space directory, find the relevant space and click the (i) icon there to get to the space details page. From there, click either Space Operations/PDF Export, or Content Tools/Export, then choose Custom Export. You’ll be able to select the list of pages to be exported. (All pages under a given page can be selected by clicking Deselect All and then clicking the checkbox for the parent page. All child pages will be selected automatically.)
My first instinct was to give the "other" folks who want to read the meeting notes, (read) access to confluence itself - thats what confluence was meant for.
But if you're dead set on living in the 90s and downloading stuff to another drive, you can try the Page Tree Word Exporter plugin (But this is manual)
Script wise, you can do the following:
Get all the child pages with the REST API: Make a GET call to
https://confluence-domain.com/rest/api/content/search?cql=parent={Parent Page-id}
This will return a "results" array with info about the child pages. Parse out the "id" fields. (Hint: if you are using bash, you can use the beautiful jq library https://stedolan.github.io/jq/
Once you have the child page IDs, you can export each individually to PDF using:
wget https://confluence-domain.com/spaces/flyingpdf/pdfpageexport.action?pageId=xxxx -O mypage.pdf
This blog might help you in your coding: http://javamemento.blogspot.no/2016/05/jira-confluence-3.html
Step 1 (bottom left):
Step 2:
To export all pages below a page, check the parent page.
If the export is absent, the admin needs to give you the permissions for it.

Schema microdata: Is it damaging to reference an item that is only present on some pages?

I'm building a WordPress theme. The LocalBusiness entity is stated in the header of the website (present on every page). I would like to "itemref" the business description, which is only present on the home page. I can put the reference in and it will work on the home page, but on every other page there will be a reference to a non-existent item. Is this a bad thing or not?
The itemref attribute can only be used for referencing elements from the same document.
What to do instead?
You could duplicate the description on each page. If you don’t want to have it as visible content, you could use a meta element.
You could omit the description on the additional pages.
You could (and should anyway) provide the url for the item (typically the homepage, if the whole site is about this business), and hope that consumers interested in this item will follow the URL to learn more about it (so they would find the description).

Sitefinity: How to set page title based-on the content item being viewed?

I have a page in Sitefinity 7 and its entire purpose is to show the detailed view of a custom content item.
So I've dragged-on a widget to the page, selected that it only shows one particular item only, without selecting which, because it should be whatever one was chosen from another page which caused them to navigate here.
One not-selected content item.
The page with the list control navigates to the detailed page.
But the page title is the same no-matter which is selected. I want the page title to be one of the content item's fields. How can I get the page title to be based-on the item we're viewing?
Edit the Awards widget on your details page and then go to the Advanced settings, then in the MetaTitle field enter the field name of your module you'd like to use, so in most cases "Title", then in the PageTitleMode field, you can enter one of a few options, Append, Replace or DoNotSet. Documentation on those options is here. You can also utilize the MetaKeywordsField and MetaDecriptionField by also mapping those to a new "SEO Keywords" or "SEO Description" long text field on your module for instance. Documentation on that is here.
The screenshot is from Sitefinity 6.3 but it should be the same.