AxCMS.net Blog

Grigory Grin about AxCMS.net

Organizing Elements in the Ribbon Toolbar

clock December 2, 2010 10:52 by author Grigory Grin

Do you know the phenomen: you develop a bigger application and end up with a lot of structure elements and dynamic elements. Your Editor has to scroll the toolbar trying to spot the element he needs at the moment.

What can be done about it?

1. Use Element Groups

With version AxCMS.net 9.2 it is possible to group the elements in the ribbon toolbar:

Groups are created with a new section in CmsSite.xml: ElementGroupDefinitions.

    <ElementGroupDefinitions>
        <ElementGroupDefinition axid="Formular" name="Formular controls">
            <ElementTemplates>
                <ElementTemplate axid="dyn_1001" atLeast="0" atMost="100"/>
                <ElementTemplate axid="dyn_1002" atLeast="0" atMost="100"/>
                <ElementTemplate axid="dyn_1003" atLeast="0" atMost="100"/>
                <ElementTemplate axid="dyn_1004" atLeast="0" atMost="100"/>
                <ElementTemplate axid="dyn_1005" atLeast="0" atMost="100"/>
                <ElementTemplate axid="dyn_1006" atLeast="0" atMost="100"/>
                <ElementTemplate axid="dyn_1007" atLeast="0" atMost="100"/>
                <ElementTemplate axid="dyn_1008" atLeast="0" atMost="100"/>
                <ElementTemplate axid="dyn_1009" atLeast="0" atMost="100"/>
                <ElementTemplate axid="dyn_1010" atLeast="0" atMost="100"/>
                <ElementTemplate axid="dyn_1011" atLeast="0" atMost="100"/>
                <ElementTemplate axid="dyn_1012" atLeast="0" atMost="100"/>
            </ElementTemplates>       
        </ElementGroupDefinition>
    </ElementGroupDefinitions>

AxID references the elements already defined under ElementTemplateDefinitions.

For a given placeholder you can allow the whole group:

<PlaceholderDefinition axid="basePlaceholder">
    <ElementTemplates>
        <ElementTemplate axid="GreyCellLine" atLeast="0" atMost="2"/>
        <ElementTemplate groupID="Formular" atLeast="0" atMost="100"/>
        ...

It saves time and avoid redundancy mistakes.

If a group is allowed for a placeholder, it also appears on the left in the toolbar allowing to reduce the editor's choice significantly.

2. Use icons to help the editor distinguish the elements easily

For every structure element you create you can optionally define an image to be used in the toolbar. Get use of this feature!

To attach an image use RibbonImage-element under ElementTemplateDefinition:

   <ElementTemplateDefinition axid="20" description="3 columns (3 x 160px)">
      <File>RowControls\Axinom\EnglishPlaceHolder_160_160_160.htm</File>
      <RibbonImage file="/images/RibbonImages/Elements/3_columns.png"/>

Dimensions of the image are 92x62 px, preferably in PNG-format.

3. Use descriptions understandable for the Editors

The AxID you assign to the element is only used inside CmsSite.xml. But the description-attribute will be shown to the editor. So use it reasonably, allowing the editor to understand what this element is about. Even if you follow the previous advice and do use icons, the descriptions are still shown as a tooltip.

4. Be carefull about named elements

It is possible to give a name to any object on any page. Such named elements automatically appear in the toolbar. If this feature is used often, there are more and more items in the toolbar which look very similar. Many of them are probably outdated.

To remove a named element from the toolbar you just need to find it and remove the name. To find them - go to Edit / Objects and check "Only Named".

A radical way to remove all the named elements would be to run this statemet in the MS-database.

UPDATE AxObject SET Name = NULL

Please only run it if you know what you do.

5. Allow only the elements which are really needed for a given placeholder

For every placeholder you can define the elements which can be added there. Only allowed elements are shown in the toolbar.

You can also define different placeholders for different purpose, limiting number of elements available for each placeholder.

Apply this advice with care: if you do too much optimizig, your editors will start missing elements here and there.

 

As you see, there is a lot, developers can do for the editors and increase the success chances of their project.



AxCMS.net with only one virtual directory

clock September 22, 2010 16:58 by author Grigory Grin

A typical AxCMS.net installation on one server would need 3 web sites or 3 virtual directories in IIS:

  • for MS (/AxCMSweb_MySite)
  • for LS (/AxCMSwebLive_MySite)
  • for Publish Services (/AxCMSPublishService_MySite)

Good news: you can come up with only one virtual directory and nesting the other stuff below:

  • The LS runs in the root virtual directory ("/MySite")
  • MS resides in a subdirectory ("/MySite/MS")
  • PublishService resides in another subdirectory ("/MySite/Publish")

A typical issue in such configuration is the inheritence of the web.config parameters (you have one web.config in the root directory and one in MS or Publish subdirectories). The sub-applications might try to use some of the root web.config parameters, which leads to confusion. To avoid that,  you can put the most keys on the LS web.config into the location-element and turn off the inheritance, here is an example:

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
             <configSections/>
             <location inheritInChildApplications="false">
                <appSettings/>
                <system.web/>
                <system.webServer>
            </location>
  </configuration>

If you wish more details, please contact me.



How to change the background color in the text editor?

clock August 4, 2010 10:58 by author Grigory Grin

By default tinyMCE (the text editor used in AxCMS.net) uses white background. If your site laout uses inverse color scheme (e.g. white font on black background) it would be not comfortable to see the white font on white background in the editor.

But there is a solution for this. You can configure the background color of tinyMCE (as well as some other options).

They can be defined in the file "/AxCMSweb_[your_project]/TinyMCE/jscripts/tiny_mce/themes/advanced/skins/default/content.css".

The line responsible for the background color is this one (default in the version 9.0 and 9.1):

body {background:#FFF;}

Change the color to #000 to make it black (or to any other value of your choice).

You can also add a keyword !important to override any value specified in the custom CSS file if one is used (default in the version 9.2 and above):

body {background:#FFF !important;}

 



HTML text wrapping in the text editor

clock August 3, 2010 16:27 by author Grigory Grin

AxCMS.net uses tinyMCE as a text editor. You might have noticed, that it wraps any text you type into the editor into the <p>-element. Usually it is ok, but sometimes you don't want this behaviour. For example, if you add a placeholder between <h1> and </h1> you don't want additional pair of <p>...</p>.

Fortunately you can control this behaviour of tinyMCE with an option "forced_root_block".

Locate the file "\AxCMSweb\EAL.js" and look for "forced_root_block" in it. You will find something like this:

forced_root_block : 'p'

Replace it with:

forced_root_block : false

and no more <p>-blocks will be added automatically around your text.

If you don't find this option in EAL.js, add it to the function InitMCE:

function InitMCE(elemID, validElements, path, labelID, pageID) {
    tinyMCE.init({
        mode: "exact", elements: elemID,
        theme: "advanced",
        relative_urls: "false",
        verify_html: "true",
        valid_elements: validElements,
        plugins: "insertlink,table,heading",
        heading_clear_tag: "p",
          forced_root_block : false,
        theme_advanced_buttons1_add_before: "h1,h2,h3,h4,h5,h6",
        theme_advanced_toolbar_location: "external",
        cms_application_virtual_path: path,
        ax_label_id: labelID,
        ax_page_id: pageID,
        content_css: GetDocumentStylesheets()
    });
}

 



Search in help.AxCMS.net directly from your browser

clock August 3, 2010 16:16 by author Grigory Grin

If you are an AxCMS.net Developer you will find handy the new possibility to search in the AxCMS.net Online Help directly from your browser toolbar.

How to do it?

  1. Go to http://help.AxCMS.net
  2. Add "AxCMS.net Help" to the list of your search engines as shown on the screenshots below
  3. Type the search term into the search box and hit Enter
  4. That's it!

 

Adding AxCMS.net Help search engine in FireFox

Adding AxCMS.net Help search engine in Internet Explorer



How to use Windows Authentication with AxCMS.net?

clock June 14, 2010 15:36 by author Grigory Grin

Usually you login into AxCMS.net (Management System) using your AxCMS.net username and password.

But you can easily switch to Windows Authentication and take advantage of the Single Sign On.

Read more under Secure Installation of AxCMS.net: http://help.AxCMS.net/en_help_cms_inst_security.AxCMS



How to Create a Category in AxCMS.net

clock June 2, 2010 17:08 by author Grigory Grin

There are many ways to create a category in AxCMS.net - manually via GUI, WebDAV, programmatically via API or import from XML.

  1. The Classic: Manually via GUI
  2. Import Categories from an XML File
  3. Category Creation Box
  4. WebDAV
  5. Adding new categories via SQL
  6. Cloning
  7. Programmatically via API
  8. API: Importing XML file programmatically
  9. API: Using AxCategoryAdapter

Read on: http://help.axcms.net/en_help_cms_dev_categories_ways_to_create.AxCMS



Reports and Alerts in AxCMS.net

clock June 2, 2010 15:54 by author Grigory Grin

Demistrifying the black art: everything you need to understand Reports and Alerts in AxCMS.net and develop your own.

Reports and Alerts are the two user-notification mechanisms in AxCMS.net MS. Both are a part of the workflow support. Reports are generated once a day. Sample reports are "Pages created recently" or "Documents waiting to be published".  Alerts are generated immediately when a certain action takes place. Sample alert is "Publishing Request" which is triggered every time publishing is requested for any  page. Essentially both reports and alerts are lists of objects fullfilling certain criteria. There is a plenty of pre-defined reports and alerts coming with AxCMS.net. As a developer you can create your custom reports and alerts and add them to AxCMS.net. This article helps you to understand reports and alerts architecture and develop your custom reports and alerts.

Base class for the reports is AxReport and for alerts - AxAlert (which derives from AxReport). Both implement IServiceTask interface. It means, they are scheduled as Service Tasks and are executed inside AxCMS.Service. Report subscriptions are stored directly in the AxServiceTask table as recurring tasks (executed every 24h starting with the time of the fist subscription). Alerts subscriptions are stored in the AxUserAlert table. Users subscribes for an alert for some specific category (and its subtree). So it is possible to be immediately informed about important events and don't be over-spammed at the same time. When an alert is triggered, an entry in AxServiceTask is created, which is executed only once.

Learn more:



Tips & Tricks: Reusing Content Blocks

clock April 20, 2010 10:38 by author Grigory Grin

It is very easy in AxCMS.net to create reusable layout elements. So called Structure Elements can be created by a Developer / Designer and included into the project. Such element can be so simple as button with hardcoded link or so complex as a whole page structure with a lot of placeholders and nested sub-elements. An Editor can then pick the elements she needs from the ribbon toolbar: 

And it is there ready-to-be filled out with content. 

But how about reusing the content?

If our editor spent some time on filling-out the element and has something like this: 

Is it possible to insert the same element – with the same content – on other pages? The answer is YES. 

To accomplish this first you need to give this element a name. Go to the properties of the element, open the panel Additional Properties, your name in the text box “Define name for element box” and click Check-In: 

Nothing changes, but now if you open another page and try to add a structure element there, you will find your named element on the toolbar:  

It appears right after the structure element which was originally used, it has a star-icon over the element-icon and the given name of the element as a tool tip.

One click and a copy of the content block is added.

 

Notes 

·         A copy does not have the name under “Additional Properties” – it is saved only in the original element only.

·         If you want to remove the element from the toolbar, you go to the original element and remove the name from the textbox.

·         To find named elements, go to Edit / Objects and tick the checkbox “Only named elements”. You can additionally filter by element type.

·         You can name not only a structure element, but any content object, like a text block or image.

·         NB. If you added multiple copies of the same named element, don’t expect that you can change one instance and all the others will be updated accordingly. It might work, but it does not as a general case. Why and what are alternatives I will explain in further posts from Tips & Tricks series.

 



Tips & Tricks: Searching in Management System More Precisely

clock April 8, 2010 14:58 by author Grigory Grin

Does it sound familiar to you: you are looking for a page in Management System and you type into the search box in a page overview, click Enter and ... either you see no matches or too many matches. Strange, you think, then click on "extended search" and type the same term into the Name textbox. Then the results are what you expected.

Why does it happen? Because different search logic is used in the basic search and extended search. The "basic" in basic search refers to the user interface - it really simple - one textbox. The logic behind is pretty sophisticated. It uses AxCMS.net Index Search and it means - you can use all the features it provides (see below).

Basic Search in Page Overview

Extended search allows you to filter by any field you like or a combination of those. But behind the scense a simple LIKE-search in the SQL server is used. So if you type "myPage" it searches for "Name LIKE '%myPage%'".

Extended Search in Page Overview

How to achieve better results with the basic search?

If you know, in which page field you want to search, just specify the field. Search for "Name=myPage" instead of just "myPage". If you omit the field name, it searches in all possible fields, inclusive the page content. (Now you know, why you sometimes find more as you wish.) This syntax will not search parts of the words. Apply wildcards. Search for "Name=myPage*" or even for "Name=*myPage*". Here are some other usefull fields you can search in:

  • Content
  • Title (HTML-title)
  • Caption (aka Headline)
  • Description
  • AdditionalString
  • Keywords

But you don't even need to go to the page overview to search for a page. At the top-right corner of the screen you see a permanent search box. It has exactly the same behaviour as the textbox of the basic search in Page Overview.

Search Box in Top Menu

Searching in Documents is very similar.

Search syntax support even more complex stuff, like logical operators AND, OR and NOT. You can find all the details in Help & Support Center.



Welcome

Grigory Grin - welcome to AxCMS.net Blog!   Grigory Grin / Axinom GmbH / Director Platform Strategy

blog@axcms.net

RecentPosts

Sign in