Home

Flash CMS: Menu bar XML attributes

There are 5 different types of content to be defined in the xml file for the menu bar:

  • Logout
  • Page Content
  • Upload Files
  • External Link
  • Separator (used to simply separate items in the menu).

Logout

<menuitem label="File">
    <menuitem label="Logout" id="logoff"/>
</menuitem>

The label can be named whatever you like, but the attribute “id” must be “logoff”.

Page Content

<menuitem label="Edit">
    <menuitem label="Malis" contentSource="t1" slotSource="slot_layout_main.xml" hideContentVersionManager="0"  bgColor="E0E1E2" slotNew="1" slotMove="1" slotCopy="1" slotLayout="1" slotDelete="1"/>
    <menuitem label="Tincidunt" contentSource="t2" slotSource="slot_layout_main.xml" hideContentVersionManager="0" bgColor="E0E1E2" slotNew="1" slotMove="1" slotCopy="1" slotLayout="1" slotDelete="1"/>
    <menuitem label="Bonorum" contentSource="t3" slotSource="slot_layout_gallery.xml" hideContentVersionManager="0" bgColor="E0E1E2" slotNew="1" slotMove="1" slotCopy="1" slotLayout="1" slotDelete="1"/>
    <menuitem label="Voluptua" contentSource="t4" slotSource="slot_layout_simple.xml" hideContentVersionManager="0" bgColor="222222" slotNew="1" slotMove="1" slotCopy="1" slotLayout="1" slotDelete="1"/>
    <menuitem type="separator"/>
    <menuitem label="News" contentSource="t6" slotSource="slot_layout_news.xml" hideContentVersionManager="0" bgColor="8A887D" slotNew="1" slotMove="1" slotCopy="1" slotLayout="1" slotDelete="1"/>
</menuitem>

label

  • For example “Home” or “About us” etc.

contentSource

  • This is the link to database, to the table “turtlebite_index”.
  • Tip: At first glance you might want to have a self-explanatory name for the source. But I would not recommend to do so, because if, for any reason, you change the structure of the website, it will quickly get tedious to change all source names also. To keep it simple, I name it like this: s1, s2, s3….s20 and so on. Then, I have a list where I write down the pairs: s1 → “Home”, s2 → “About us”, s3 → “Products” and so on. If I have to add or change the structure, I just have to update my list, not the table itself. This may look like extra work, but if your site grows, it will be much easier and cleaner.

slotSource

  • This is the link to the slot layout xml file. This xml file describes the position and size of the textfields and images for each slot, organized in different layouts.

hideContentVersionManager

  • If set to “1”, the Content Version Manager is visible to the user. If it is “0”, it will be hidden, so that the user cannot select and/or save different versions of a content page.

bgColor

  • The background color. Here you can set the color to the same color you use on your website. This can be defined per content page.

slotNew

  • If “1”, the user can create new slots. If “0”, not new slots can be created.

slotMove

  • If “1”, the user can move slots to change their order. If “0”, no movement is allowed.

slotCopy

  • If “1”, the user can copy slots. If “0”, no slot can be copied.

slotLayout

  • If “1”, the user can choose from pre-defined layouts. If “0”, no layout can be selected.

slotDelete

  • If “1”, the user can delete slots. If “0”, no slot can be removed.

allowFineTuning

  • If “1”, the user can fine tune the position and width/hight of a picture and a textfield. This is very useful, if you need to line up a picture to the text, or if a word just cannot be placed in the same line because it needs to much space. You can now increase the width of a textfield by a few pixels to make room for that word.

Upload Files

<menuitem label="Upload">
    <menuitem label="Main - 1 column" id="filemanager" dir="images/1_column" fileExt="jpg,png,gif,swf" hasPicCropper="1" maxWidth="586" maxHeight="1000" fixedProp="0" fitToMax="1" hideFitToMax="1" createThumb="0" forceThumb="0" th_fixedProp="1" info="Main - Pictures - 1 Column"/>
    <menuitem label="Main - 2 columns" id="filemanager" dir="images/2_column" fileExt="jpg,png,gif,swf" hasPicCropper="1" maxWidth="285" maxHeight="1000" fixedProp="0" fitToMax="1" hideFitToMax="1" createThumb="0" forceThumb="0" th_fixedProp="1" info="Main - Pictures - 2 Columns"/>
    <menuitem label="Main - 3 columns" id="filemanager" dir="images/3_column" fileExt="jpg,png,gif,swf" hasPicCropper="1" maxWidth="650" maxHeight="500" fixedProp="0" fitToMax="0" hideFitToMax="1" createThumb="1" forceThumb="1" th_maxWidth="184" th_maxHeight="129" th_fixedProp="1" info="Main - Pictures - 3 Columns"/>
    <menuitem label="Main - 4 columns" id="filemanager" dir="images/4_column" fileExt="jpg,png,gif,swf" hasPicCropper="1" maxWidth="650" maxHeight="500" fixedProp="0" fitToMax="0" hideFitToMax="1" createThumb="1" forceThumb="1" th_maxWidth="134" th_maxHeight="94" th_fixedProp="1" info="Main - Pictures - 4 Columns"/>
    <menuitem type="separator"/>
    <menuitem label="News - 1 column" id="filemanager" dir="images/1_column_news" fileExt="jpg,png,gif,swf" hasPicCropper="1" maxWidth="650" maxHeight="500" fixedProp="0" fitToMax="0" hideFitToMax="1" createThumb="1" forceThumb="1" th_maxWidth="213" th_maxHeight="400" th_fixedProp="0" info="News - Pictures - 1 column"/>
    <menuitem label="News - 2 column" id="filemanager" dir="images/2_column_news" fileExt="jpg,png,gif,swf" hasPicCropper="1" maxWidth="650" maxHeight="500" fixedProp="0" fitToMax="0" hideFitToMax="1" createThumb="1" forceThumb="1" th_maxWidth="100" th_maxHeight="80" th_fixedProp="1" info="News - Pictures - 2 column"/>
    <menuitem type="separator"/>
    <menuitem label="Gallery (Bonorum)" id="filemanager" dir="images/gallery" fileExt="jpg,png,gif,swf" hasPicCropper="1" maxWidth="650" maxHeight="500" fixedProp="0" fitToMax="0" hideFitToMax="1" createThumb="1" forceThumb="1" th_maxWidth="100" th_maxHeight="80" th_fixedProp="1" info="Gallery - Pictures"/>
</menuitem>

label

  • For example “Home” or “About us” etc.

id

  • MUST be “filemanager”

dir

  • The root folder that the user can select pitures from. In the sample code above (in the first label), the user can only upload pictures to “images/1_column” but not to “images”. It's up to you to precisely define where the user can upload pictures, so the files are at the right place to choose from later in the slot.

fileExt

  • The file types the user will be able to upload. If you don't want to restrict it, set it to “*”.

hasPicCropper

  • If “1”, the user will be able to resize/crop images when they are uploaded. If “0”, the image will be uploaded as it is, without resizing.

maxWidth

  • Set the maximum width the image will be when using the picCropper. For example, when you set it to 500, all images will never be wider than 500 pixels.

maxHeight

  • Same as maxWidth, this time for height.

fixedProp

  • If “1”, the aspect ratio of the image will be preserved when resizing/cropping. If “0”, it can be freely resized/cropped.

fitToMax

  • If “1”, the image will always be resized to either maxWidth or maxHeight, even if it was smaller after resizing/cropping. If “0”, the image will only be resized to maxWidth/maxHeight if it was larger than maxWidth/maxHeight after resizing/cropping.

hideFitToMax

  • If “1”, the user can decide if the image is being adjusted after resizing/cropping as described above. If “0”, the user cannot decide and it the adjustment will be done as you have defined it in fitToMax.

createThumb

  • If “1”, the user can resize/crop the image twice: once for the large picture and once for the thumbnail. The thumbnail will automatically be created with the prefix “th_”. If “0”, only the large image will be created.

forceThumb

  • If “1”, the user is forced to define the thumbnail. If “0”, the user can skip the creation of a thumbnail image.

th_fixedProp

  • * Same as fixedProp above, only this time for the thumbnail image.

info

  • Here you can enter some text that is visible in the filemanager. This can be useful for the user, for example you can show him what files can be uploaded, or in what section he's in, or whatever.
flash-cms-menu-xml-attributes.txt · Last modified: 2011/11/11 18:55 (external edit)
 
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki