Section definition in Atlassian RefApp? - atlassian-plugin-sdk

I am trying to insert a web-item into top level menu section.
<web-item key="googleLink" section="system.top.navigation.bar" weight="40">
<label key="GOOGLE" />
<link linkId="GoogleId">http://google.com</link>
</web-item>
where is this section defined: system.top.navigation.bar? So I know which sections I can use in system?

I think the page on Web Fragments is what you're looking for.

use section="index.links"
or try for different location: section="system.admin/general",section="header.links" or section="footer.links".

Related

typo3 flux select multiple pages suggest wizard

<flux:field.input name="pages">
<flux:wizard.link label="Select link" activeTab="pages" />
</flux:field.input>
with this I can select ONE page. But how can I select MULTIPLE pages, like it is done at the Menu-Content-Items.
tryed: field.select -needs an item-propery.
field.relation I did not succeed, too.
Thank you for your help,
Christian.
Edit: This is what I'm currently trying:
<flux:field.relation
name="settings.relationtest"
label="relationtest"
multiple="true"
size="6"
minItems="0"
maxItems="30"
renderMode="singlebox"
foreignTableField="pages"
>
<flux:wizard.suggest
label="NULL"
hideParent="0"
pidDepth=""
minimumCharacters="1"
searchWholePhrase="0"
table="pages"/>
</flux:field.relation>
Had the same problem and tried a lot with different viewhelpers. flux:field.relation seems the right solution for this one. I use a quite simple snippet:
<flux:field.relation label="Auswahl der Seiten" table="pages" size="6" multiple="true" minItems="0" maxItems="30" name="parentpages">
<flux:wizard.suggest />
</flux:field.relation>
Selecting multiple pages works fine.
Perhaps your problem came from setting the 'table' parameter on flux.wizard.suggest (Link).

Typo3 6.2: Table Records in FCE (Flux)

I am trying to get a list of table-records in my FCE.
In documentation, i found the part "items" can use a Query.
But i can not find a way to make it work.
<flux:field.select name="myRecord" items="NOTHING WORKS HERE" label="Choose" maxItems="1" minItems="1" size="5" multiple="false" />
Does anybody know how the items can be filled with table-records ?
If you are trying to get the select box with all items maybe you can then switch to this:
<flux:field.relation size="1" minItems="0" table="tx_{YourExtensionName}_domain_model_{YourObjectName}" maxItems="1" name="package">
</flux:field.relation>
Of corse, you can use any table from the DB, like "pages"..
Hope it helps!

Use page <title/> in surrounding template in Lift

I know that in my /page.html I can do:
...
<body class="lift:content_id=main">
<div id="main" class="lift:surround?with=default;at=content">
<title class="lift:head">TITLE_GOES_HERE</title>
...
... but it would be much more transparent for designers to be able to just put <title/> in the <head/> of a /page.html.
Would it be possible for a <title/> snippet used in /templates-hidden/default.html to somehow read the regular head <title/> in currently used /page.html?
Thanks!
I think the answer is rather "no", because Lift reads only the data inside id="???" in page.html. This is an architecture choice AFAIK.
You should ask on the mailing list, I think, if you propose any changes to the Lift architecture.
BTW, do you know that the title is overridden (inserted) if you use the SiteMap?: https://www.assembla.com/wiki/show/liftweb/SiteMap

Adding items to a resource restfully using OpenRasta

I'm using OpenRasta to create a Survey application.
I have a SurveyResource that is accessible at /surveys/{id} and editable at /surveys/{id}/edit
I'd now like to add questions to the survey, as that is the point of a survey, but I'm not sure what the most restful way of doing this is and how to set it up in OR.
I'm thinking I should have a QuestionResource (that has details of the question type, question text, etc) and it should be posted to /surveys/{id}/questions and handled by a question handler, but I can't work out how to configure OR.
I've pushed my project onto github at https://github.com/oharab/OpenSurvey/tree/add_question_to_survey
Can anyone help me?
Ben
it depends on the way you want to model your resources. It's perfectly possible that you'd never explicitly provide access to a single question, and would modify the entire survey document, like so:
PUT /surveys/123
<survey>
<link rel="update" href="/surveys/123" method="PUT"
type="application/vnd.mycorp.survey+xml" />
<question id="age">
<label>How old are you?</label>
<select>
<option>0 - 5</option>
<option>6 - 10</option>
<option>10 - 13</option>
</select>
</question>
</survey>
If you go this route, you could even use HTML, or HTML 5 for your content so it's easy to consume by clients. Now you're just modifying the entire survey document at once.
Alternatively, you might want to separately address each question, giving them an individual URI, which I think is what you're talking about, like so:
GET /survey/123
<survey>
<link rel="add-question" href="/survey/123/questions"
type="application/vnd.mycorp.surveyquestion+xml" method="POST" />
<question>
<link rel="delete" href="/questions/123-age" method="DELETE" />
<link rel="update" href="/questions/123-age" type="application/vnd.mycorp.surveyquestion+xml" method="PUT" />
<label>How old are you?</label>
<select>
<option>0 - 5</option>
<option>6 - 10</option>
<option>10 - 13</option>
</select>
</question>
</survey>
Neither of these is more RESTful than the other, the difference is only in granularity of call. If you need the granularity of the latter, then configure yourself a separate handler per resource as in
using(OpenRastaConfiguration.Manual)
{
ResourceSpace.Has.ResourcesOfType<Survey>().AtUri("/survey/{id}").HandledBy<SurveyHandler>();
ResourceSpace.Has.ResourcesOfType<Question>().AtUri("/questions/{id}").HandleBy<QuestionHandler>();
}

Sharepoint 2007 - Custom List provisioning - are List Forms needed at deployment?

I have a feature which is provisioning 1 document library and 2 custom lists. A folder is included for each list containing the schema.xml for that list. Each folder also contains the associated forms (AllItems, DispForm, EditForm, NewForm, etc.). Everything deploys/works correctly but it seems a little redundant having the same forms copied into each list's folder. There is nothing special about these lists - the are basically a default doc library/generic list with additional fields provided through new content types (derived from Item/Document).
As far as I can tell these forms are pretty generic. Are there pre-installed forms that I can reference from my list so I don't have to deploy all of these extra files? Is there any reason I would not want to do this?
Update - moving xml in comment to original question for readability:
<Forms>
<Form Type="DisplayForm" Url="Forms/DispForm.aspx" WebPartZoneID="Main"/>
<Form Type="EditForm" Url="Forms/EditForm.aspx" WebPartZoneID="Main"/>
<Form Type="NewForm" Url="Forms/Upload.aspx" WebPartZoneID="Main"/>
<Form Type="NewFormDialog" Path="EditDlg.htm">
....
There are virtual defaults that are used if you don't specify a concrete page.
All lists use these template defaults unless you use a tool like SharePoint designer to customize the page. Then the template is used to create the concrete page and you can customize the look for a particular list without affecting others.
For my custom definitions, I use
<List>
...
<MetaData>
...
<Forms>
<Form Type="DisplayForm" Url="DispForm.aspx" SetupPath="pages\form.aspx" WebPartZoneID="Main" />
<Form Type="EditForm" Url="EditForm.aspx" SetupPath="pages\form.aspx" WebPartZoneID="Main" />
<Form Type="NewForm" Url="NewForm.aspx" SetupPath="pages\form.aspx" WebPartZoneID="Main" />
</Forms>
</MetaData>
</List>
If you have no reason to customize the out of the box version of these forms, you can use the virtual form and not deploy copies.