Please suggest a better property name for Items Order Index (in a list) - naming

Hi I have a class of let's say "Channels", like folders - but it could be menu items in a navigation block. So obviously a "Channel" has properties like
.Title
.Alias (wordPress slug-like)
.Content
.RedirectUrl (may act as a hyperlink)
.StateProperties.IsActive
.StateProperties.IsFeatured
/// etc..
but in many cases I would want to set the order of my items in a navigation menu block manually - by whatever importance I decide, right.. ? (not by abc or timestamp)
So I've added a property called
StateProperties.OrderIndex just for this... a colleague of mine has called it "z-index" while he was referring to it... I am trying to build a CMS framework for our internal needs and just seeking your opinions as to what name could possibly be used for my "OrderIndex" ?
To me "OrderIndex" just makes sense :)

I believe 'OrderIndex' is exactly what you are looking for, since index stands for position and you are setting an 'Order' position. The 'Z' in 'z-index' stands for depth position, which does not seem to match what you are trying to go for.

I would prefer Order or Sequence. I think z-index carries a different meaning that what you're after (more for ordering on a stack).

Related

Changing excel's upper context menu (the one with format options)

I'm trying to change context menu items using VBA, similar to this Microsoft's docs for my application yet, that one!
The end user will be attending to a line of customers and adding products to their, let's say, virtual "shopping cart".
This "shop" has very limited items on sale and they would fit easily on the context menu and by clicking on then the user would add each item in a very 'well behaved' manner. Yet, I'm trying to make things a little faster, editing not only the main context menu (as explained on posted MS docs), but editing the upper as well.
It's a little improvement on the user side, as items will be closer to the cursor.
So, this question refers to "how-to", but any help, even the name of this menu, would be appreciated.
It's easier to find documentation when you know the names of stuff.

Kentico cms.file publish date

I've got a simple repeater that list links to uploaded documents using cms.file. I'm drawing a blank on adjust the ORDER BY based on publish date. I can't find anything here on this, so i apologize if this is a duplicate.
Best practice is to add custom field to page type (in this case cms.file or better create the new one) and set ORDER BY condition to this new field. There are also properties like DocumentModifiedWhen, DocumentCreatedWhen, DocumentCheckedOutWhen you can use.
I'm going to use DocumentModifiedWhen as the ORDER By statement.
There are two fields [DocumentPublishTo] and [DocumentPublishFrom] that you can think of using. These are the two fields which appear at the bottom of each form page by default.

How can I activate (display) a view using Revit API?

I am trying to activate a view using Revit API. What I want to do exactly is to prompt the user to select some walls, but when the user is asked that, he can't switch views to select more walls (everything is greyed out at that point).
So the view I want to activate (by that I mean, I want this view to be actually shown on screen) already exist, and I can access its Id.
I have seen threads about creating, browsing, filtering views, but nothing on activating it... It's a Floor Plan view.
So far I can access its associated ViewPlan object, and associated parameters (name, Id, ..).
Is it possible to do ?
Thanks a lot !
Arnaud.
I think the most preferred way is the UIDocument.RequestViewChange() method. The tricky part about this is that unless you've designed your application to be modeless with external events or idling, it may not actually happen until later when control returns back to Revit from your addin.
(There's also setting the UIDocument.ActiveView property - not positive if this has different constraints).
The other way that I have done it historically is through the use of the UIDocument.ShowElements() command. The trick here is that you don't have control of the exact view - but if you can figure out the elements that appear only in that view, you can generally make it happen (even if you have to do a separate query to get a bunch of elements that are only in the given floorplan view).
Good Luck!
I think the solution to your problem may be:
commandData.Application.ActiveUIDocument.ActiveView = View;
The ActiveView is a property and it has {get and set} options.
ActiveView has only a get accessor, what Mostafa suggests will not work.
I have used the RequestViewChange() method with a modal dialog and have not had problems so far.

Create domino view dynamically in XPages

I want to know if I can click a button in my XPage and dynamically create a Domino View and then show it in a panel control on the same page. The reason I want to do this is because I have a categorized view and I don't want to lose category data by using full text search. So I am thinking of creating a new view dynamically and pass my search parameters, like end date or start date, into the view selection formula.
Is it possible? Any other alternative solution is also welcome.
yes you can, but you don't want to. A Domino view takes space in the database and quite some time for its first use. So you end up with a lot of views taking space and the need to adjust database space after removal. Your response times will suck big time.
Categories as shown in Notes views are no web interaction pattern, so you might want to solve a problem that actually shouldn't exist.
The preferred method for Domino application is navigation / drill down over search. But you could do a FTSearch where you add your category to the search parameters and render your results in a repeat control instead of a view control. There you have more control over the look and feel.
Whether or not it's the best solution, the answer to the immediate question about creating a view on the fly is yes: the Database class has a couple "createView" methods to allow you to create a new view, either entirely from scratch or based on a named other view. From there, you can use the "setSelectionFormula" and "createColumn" methods in the created View to build what you want. You can't do EVERYTHING with those methods, but it may be enough.
One problem you'd likely run into is ACL access: you'll need Designer rights to the database, which a normal user most likely wouldn't have. If you use the sessionAsSigner object to fetch a signer version of the DB (say, "var signerDB = sessionAsSigner.getDatabase(database.getServer(), database.getFilePath())"), you can work from there. Off the top of my head, I don't remember if you will also have to up the "Maximum Internet access" setting on the last tab of the ACL to Designer as well, but you may.
I am assuming that you are referring to the problem that exists when you choose the documents based on the category. This is something that I find highly annoying and I wish that it was possible to turn this on and off. It makes sense for embedded views, but not for much else.
What I did to solve this was to include the category value in the next column. In this way that text could still be seen, even if it was a flat view.
Alternatively, you could also look into using a repeater control and create your own way of presenting the information. This would be used instead of a (Dynamic)ViewPanel control. You could then present the information any way you wanted as long as it is returned in the viewrow set.
Happy Programming!

How do I modify the Magento Search to check child skus?

Currently, the site search will search all of the skus of the items marked as being visible in search. This is all well and good.
The problem arises when the customer knows a sku of the individual child item. So, let's say a product comes in both a 20 foot and 25 foot variation. We would put those into a configurable product and have a single product page where a customer could then choose which of those two lengths.
What happens is, a customer invariably knows that the sku of the 20 ft variation is RDB-20, while the other is RDB-25. A search for RDB-25 then, comes back with no results since the simple product is not visible in search - it doesn't realize there is a match.
How do I get the search to search an item with visibility "Not Visible Individually", when it's parent is visible in search?
The desired effect is that, if a child SKU is searched for, the parent should show up in the results.
There really is no good way of doing it without extending the default search, but at that point you might as well look for other options.
Here's a workaround that might be doable depending on how you manage your products and it worked for me until I moved on from the default search.
Rather than altering the search, try adding an attribute to all products and make it hidden concatenating all the skus into this field. The search should find the text attribute and show the configurable.
Its a bit of a workaround but works for me.
This is untested, but I did a bit of perusing in our attributes and I think I found something that might help.
Currently since our child products don't show up in our search, we have the parent populate with the children product's attributes.
However, things like brand, taxable amount, description, populate for every child product while our SKU does not.
The only difference I can see between the two attributes is under manage attributes -> click on attribute -> and then under properties go to frontend properties and select
Use In Search Results Layered Navigation: YES
Used in Product Listing: YES
Use In Layered Navigation: Filterable (with results)
I'm not sure which of these do what, but in the population of the fulltext search data table, somewhere it is being told to populate for the children and I believe that the admin panel is where.
I hope this helps!

Resources