(SOLVED)Block positions, arrange a block position (size, position the block position)

Discussion in 'Auto Classifieds Script' started by teletin_andrei, Apr 2, 2015.

  1. teletin_andrei

    teletin_andrei New Member

    (On Mr. Gleb S. theme: Mashinki)

    Situation:

    In order to add a new block position I have used MySQL Tool then open positions table and inserted a new position. So far so good.

    I have placed it in layout.tpl as {ia_blocks block='meniu1'} (my example: "meniu1" is the name of the new position)

    If I place it in a Div such as:

    <div class="row">
    <div class="{width section='user-blocks' position='meniu1' movable=true}">{ia_blocks block='meniu1'}</div>
    </div>

    it's visible in "Visual Mode" as "meniu1" but doesn't show up in Dashboard/Blocks menu block positioning and... I can't add any block on it, in visual it stays there but after I exit Viewmode the block is back in it's original position.

    My question is (and will definitely help others in the future too :)

    What is the correct way, to add and "activate" a new block position in layout.tpl?

    snippet from my layout.tpl
    Code (Text):
    ...</nav>
               
                {if isset($iaBlocks.header)}
                    <div class="container">
                        {ia_blocks block='header'}

                 
                    </div>
                {/if}
               
        <div class="row-fluid">
                                        <div class="{width section='user-blocks' position='meniu1'}">{ia_blocks block='meniu1'}</div>
                                       
                                    </div>                  
    {ia_blocks block='meniu1'}
    {ia_blocks block='meniu2'}


     
      </div>

            </header>....
    And how to size and position a block position?
    Or which files are in charge of the size and position of the "block positions" (not simple blocks)

    For example, I need to move the right column on the left side of the body, tried everything I could find and couldn't.



    Thank you, hope the answer will be useful for many others who wish to build themes and position the "block positions" :)


    Resources:
    http://dev.subrion.org/projects/subrion-cms/wiki/AddBlockPositions
    http://dev.subrion.org/projects/subrion-cms/wiki/Templates (to include a position for XML meta, which I did as position<meniu1>position)
  2. teletin_andrei

    teletin_andrei New Member

    I think I got it (partially) ...

    Is it scaffolding? Bootstrap 2.3 scaffolding? (dimensioning the divs in layout.tpl)
  3. teletin_andrei

    teletin_andrei New Member

    I've figured it out :D
  4. Andrew_G.

    Andrew_G. Staff Member

    Glad to see, that you could solve the problem by yourself, @teletin_andrei .
  5. teletin_andrei

    teletin_andrei New Member

    Thank you Andrew,

    If I may...one question? Is it possible to copy/duplicate exactly the looks and functions of the Quicksearch block from Atox (auto theme) to Mashinki? And keep the functionality?
    What would be the shortest way?
    Create a new block, add remote tpl location to Atox quicksearch (after disabling mashinki's quicksearch) does not work...

    It would be great to receive some help...
  6. Andrew_G.

    Andrew_G. Staff Member

    Hello @teletin_andrei ,

    It seems that we've already discussed this question via HelpDesk System.
    Anyway here is what I've written to you in the ticket (for those people who also want to know):

    In order to copy the markup of Quicksearch block from the Atox template to the Mashinki template you need to copy the ../templates/atox/packages/autos/block.quicksearch.tpl file to the ../templates/mashinki/packages/autos/ folder.

    Every time you want to use your own custom .tpl file instead of standard .tpl file you need to copy it:
    1) If this file is in ../templates/common/ folder then you need to copy it to ../templates/your_template/ folder
    2) If this file is in ../packages/any_package_name/templates/front/ then you need to copy it to ../templates/your_template/packages/any_package_name/ folder
    3) If this file is in ../plugins/any_plugin_name/templates/ then you need to copy it to ../templates/your_template/plugins/plugin_name/ folder

    Thanks for your interest in our software products!

Share This Page