Month: October 2008

Setting FCE Header from it’s Content Element Header

This article explains about how to set an FCE header from it’s content element header.

Whenever we create content element from Typo3, we have noticed that each content element can have a header, and we can set various styles for this header, such as from layout 1 to layout 6, and it can even be hidden from front-end. When we set this header for an FCE, we notice that the header will not be present within the FCE content, but it will be outside it!!! We can even create a header within FCE and map it, but an editor may have to either enter the header twice, or he may be confused which one to use.

This code below helps you overcome this and we can make use of the header specified for FCE content element, as the header within our FCE.

Now let us call our FCE field as field_header, and let us define this as a Typoscript Object.

    <tx_templavoila type="array">
        <title>FCE Header</title>
        <sample_data type="array">
            <numIndex index="0">[ FCE Header / Title ]</numIndex>
        <description>Map to FCE Header container</description>

The above field must be mapped like we do in any FCE Template Object. Now Enter the Typoscript part of this as follows:

lib.mypaneltitle= TEXT
     data = register:tx_templavoila_pi1.parentRec.header

How to view/alter Photoshop keyboard shortcuts?

This example shows how to add a keyboard shortcut for showing/hiding active layer.

1. Edit menu, select "Keyboard Shortcuts", or press Alt+Shift+Ctrl+k.
2. Find the layers menu, and far down you’ll see the line for "Hide Layers".
3. Select it, and press the shortcut you would like for this feature, for instance Alt+Shift+Ctrl+h.
4. Click "Accept", then "OK".
That’s it, now your shortcut should work.

You can even take an overview of all shortcuts… in order to do this just click on the summarize button in the keyboard shortcuts and menus wizard.

Set background image from an image field.

The following XML contains the TemplaVoila data structure for a page/fce (flexible content element).

The example shows how to set the background image for a content element, that is specified in an image field that is declared in same data structure.

<field_content type="array">
        <tx_templavoila type="array">
        <title>FCE Content</title>
        <sample_data type="array">
            <numIndex index="0">FCE Content</numIndex>

10 = COA

10.10 = TEXT
10.10.field = field_image
10.10.wrap = <div class="spa_example" style="background:url(/uploads/tx_templavoila/|) right bottom no-repeat;">

10.20= RECORDS
10.20.tables = tt_content

10.30 = TEXT
10.30.value = </div>

        !!! here comes remaining standard templavoila tags for content element field!!!!

        !!! here comes standard templavoila tags for image field!!!!

        <label>Icon Image</label>

        !!! here comes remaining standard templavoila tags for image field!!!!


Language menu seperator for sr_languagemenu

The code below is used to get a language menu seperator for sr_languagemenu as shown in the picture below:

capture10-17-2008-4.41.21 PM


10  < plugin.tx_srlanguagemenu_pi1
10 {
    links.stdWrap.split {
        token = {$plugin.tx_srlanguagemenu_pi1.token}
        wrap =  |   |*|  <span class="SPC2"> &nbsp;&#124;&nbsp; | </span> |*|    <span class="SPC3"> &nbsp;&#124;&nbsp; | </span>  

In the above code &#124; is the HTML Character Code for pipe character ( | )

The SPAN tag, and SPAN Classes are optional and solely meant for code readability!!!

Protected: RealURL Upgrade notes

This content is password protected. To view it please enter your password below: