Sulu CMS admin: is there a way to add new content automatically to the "top" of the order list? - sulu

In a situation where, for instance, a user creates a new news_item content under a news content that already has several items of the news_item type (or any other type, for that matter), the new content will be added to the bottom of the already existing volume of news_item content.
However, after adding several dozens of content-items, it's pretty annoying for the user to scroll all the way down to find the most recent item (and then often reorder it to get it all the way to the top).
Is there a setting somewhere that you can manipulate in order to make Sulu add new content to the top instead of to the bottom of an existing body of content?

I am sorry to say that this is currently not possible... Except you try to override some behavior, but I don't think that can be done in a reasonable amount of time...

Related

Typo3, set title for Mask Elements

I have a typo3 server and using the mask extension. When an editor creates a new mask element, there isnt a title in the list view. Its always "no title":
I checked the database and found the titles in the db in the field: tt_content.header but no way to set them automatically oder manually by an editor. Anyone have an idea how the title can be set automatically? Oder manually by an editor?
ext:mask has the option to reuse existing fields of tt_content for new kinds of content elements (CEs). use it to get the bonus of better interoperability with TYPO3.
TYPO3 has a logic how to show records (content elements) in the backend. one of it is the usage of the fields header and description. if you reuse these fields your CEs will look like others automatically.
If you use other fields you need to declare your fields for usage AND in case you change the kind of a CE from your kind to e.g. TEXT with Media the header stays.
Especially header is handled in the layout/partial of FSC or CSC global for any kind of CE. if the handling/rendering is changed (e.g. special layout) in an installation your CEs need special effort if they have their own building of the header.
Try to use the same fields as existing CEs and your life can be easier.
I'm having the same issue, but I found a way around it for the meantime. I edit the mask element and chenge its type to something elseโ€”like Textโ€”where I can set the title. After typing the title I save it, then change back to mask element and save again. This works by me without losing the content of the mask element. This way I can see the title in typo3 backend when I view as list or page or add content from another page. As I said, it doesn't solve the problem, but can help until there is a proper solution.
EDIT
I've just found another solution. You can add the title field to en existing mask element. To do it, go to ADMIN TOOLS > Mask, click your mask element to edit it. Add a new item by dragging the ๐—ฆ๐˜๐—ฟ๐—ถ๐—ป๐—ด item (the one on top of the list of available items) to the right where your items are. Then in General under ๐—–๐—ต๐—ผ๐—ผ๐˜€๐—ฒ ๐—ณ๐—ถ๐—ฒ๐—น๐—ฑ dropdown choose an ๐—˜๐˜…๐—ถ๐˜€๐˜๐—ถ๐—ป๐—ด named:
๐—›๐—ฒ๐—ฎ๐—ฑ๐—ฒ๐—ฟ: (๐—ต๐—ฒ๐—ฎ๐—ฑ๐—ฒ๐—ฟ)
Save, close, go to your page to add your title. This still doesn't add the title field automatically to all mask elements, but it is a step forward.
If anywhere, you should be able to set a static title automatically in your page tsconfig. You could to something like
mod.wizards.newContentElement.wizardItems.mask.elements.[title of your mask element].tt_content_defValues {
header = My Awesome title
}
Personally, I usually give every mask element a header field and ask content editors to fill it in.
See also this discussion on Mask elements and backend titles.
Hope, this helps.

Copy presentation details and data from a page to a placeholder of another page on the fly in sitecore 8.1

I have a requirement from my customer where I need to make the footer of the website dynamic in terms of adding sublayouts in footer placeholders via page editor by the Content Author.
The footer shall consist of:
One content slot - to which any sublayout/sublayouts like grid component or rich text can be added.
I want to add a new placeholder 'ContentSlotPH' to my footer which picks up its presentation details and data from a common page at "/sitecore/Content/Common/Footers/FooterContent/" ( where I have added my sublayouts like grid/richtext for the footer); and shall apply to all the pages of the website where the footer is present.
I want this change to be visible on the fly so that in future if the presentation details on FooterContent page change, new presentation and data gets applied to the ContentSlotPH of the footer.
Can someone help me in implementing this?
This functionality is not available out of the box unfortunately, the only way to achieve it with standard features (as Anton mentions in the comments) is to set them as presentation details on the standard values of a base template.
Unfortunately, this is not user friendly or editable through the Experience Editor (out of the box). It would also mean giving Content Editors write access to the templates and standard values, something that is normally locked down since making a mistake could cause exceptions especially on a production system.
Instead you could look to utilise Sitecore Placeholder Fallback. This will allow you to set up the headers/footers on a top level page and then any children will fallback to use the renderings in the placeholder from a parent item if they have not been set.
We have tried to approach this problem by using components that have presentation details on them. We call these Content Blocks, but other accelerators have different names for them with similar functionality. Essentially, this becomes a 'page inside a page'. You add your component to the template and reference a central datasource which has your footer datasource (including presentation details).
This allows for authors to have access to edit the footer by editing the footer component datasource without accessing template details.
Check out my Sitecore Base Layouts project:
http://www.awareweb.com/resources/video?vid=7d52fef2a67c453fa38dd092bd9ae7e2&
https://github.com/BenGGolden/Sitecore.BaseLayouts

Tab control to autoenter field contents

I have a set of tabs inside the window items layout in the database file.
when I click the plus popover button, I want it to generate a new record in the products layout and fill out all the fields based on the active tabs and the extra description field based on the last edit box field at the bottom of the tabs. can someone help me do this as I have tried a few different scripts and have had no success. once the record has been created in the products layout/table, I also want it to generate a record in the window item table based on the linked itemid field and the autoenter calculation that is setup on the description field.
this is probably all very confusing but I would be glad of any help you can offer.
Window Item Database Copy
Your question is more a problem than a question.
I'm assuming your questions:
1) should I use a script trigger for that?
Probably not. You should use a button to call the script, it should create all the records you need, come back to the layout and open the popover.
2) how to check the active tabs?
You should you the getLayoutObjectAttribute ( , "isFrontPanel" ). That will allow you to correctly set the ifs.
3) how to create a record in any table?
to be honest, you should start by going to the layout you want and then creating the record. That's an easier way.
What you are trying to accomplish is not that hard. You just need to break it in smaller steps.

MS Word - Lock one column on first page?

We have a company 'letterhead' template with all company info in a left column/sidebar. I'd like to lock that section for editing, but still retain the option to edit and/or mail merge the rest of the document as normal. I've tried the Restrict Editing feature, but that seems like the opposite function of what I need; I'd like to specify a section that is not editable, as opposed to a section that is.
The main problem is that the mailmerge/add-envelope function is disabled when Restrict Editing is on, but also adding a section break to a second page (to change to a single-column format on subsequent pages) isn't allowed either.
I've considered just creating an image of the left sidebar, but that seems hacky. Does anyone have any other suggestions on this one?
Much appreciated
--michael~
I opted for a combo of ideas, and used your [Cindy] last suggestion to bury an image in the first-page header. The table/content control seemed too complicated. Yes, it's a hacky solution, but with the wrapping options to prevent text over the image, it's like a margin without having to set them, so I can get rid of the multi-column and Restrict Editing thing, and subsequent pages are completely normal without extra section break necessary. I appreciate the responses. Thanks!

Binding to custom built control according to different data

Here's the issue, I build a special book reader/browser (For holy quran), my code behind loads the page and constructs how it should look. and then it should bind that look to a some kind of data-bindable custom control to view it properly. the problem is, the look differs from page to page, so I cannot bind to a certain control or wrap panel.
here's how it generally looks:
The decorative border top of the page is always there at any page, it indicates the part and chapter the viewer is in.
If you're starting a new chapter it have additional image under that decorative border or anywhere in the page (there can be multiple chapters in the same page) something like this
or this:
The normal text is not an issue, it's just a special font, however, I put each individual word in its own text block for reasons of user selection by word.
The issue here is, given the previous information, and knowing how random it is to place the decoration picture or the amount of words (text blocks) per page. how can I bind that to some kind of view to separate the view from the VM and Engine that builds the page.
my past solution was to actually build everything in the VM in a wrappanel built inside a scrollviewer having lots of textblocks and images according to the page. but that's naiive solution. I want to rebuild that in a more professional separated way. I also want to do this for Windows RT beside Windows phone so I need to reuse the code behind in a Portable class library.
I think all you need to do is slightly adjust your current design. So perhaps have a VM that represents the entire content, and that would have a Collection of say Pages or Sections. A second VM would represent the Page/Section, allowing you to create a property for the WrapPanel content (i.e. the words) and another property for the Header and or other things.
In the View you would have the scrollviewer and bind to the main VM collection. Then create another View or DataTemplate that represents the Page/Section.
You should be able to do this is a strict MVVM sense quite easily and it will be dynamic based on the content.
You could even cater for advanced scenarios where each section has a different template/view.