Skip to main content
deleted 3 characters in body
Source Link
Vlk
  • 31
  • 4

How to add html to wrap custom panels layout programaticly? I know that i can change html in *.tpl.php but i want to avoid it. Also i want to know, how to add class to panals programaticly too.

UPD: I create custom panels layout and want to add html with custom class to wrapp regions of custom panel layout. I found good decision to use module Semantic panels, but it add markup to field, not to whole region.

This is part of my html

 <?php if ($content['left'] || $content['middle'] || $content['middle_two'] || $content['right']): ?>
    <div class="row"> 
         <div class="col-xs-12 col-md-3 col-lg-3">
            <?php print $content['left']; ?>
         </div>
    </div>
  <?php endif ?>

I want to make it like that

 <?php if ($content['left'] || $content['middle'] || $content['middle_two'] || $content['right']): ?>
    <div class="row">
         <div class="col-xs-12 col-md-3 col-lg-3">
           <article class="$custom_class">
            <?php print $content['left']; ?>
           </article>
         </div>
         
    </div>
  <?php endif ?>

UPD2: I try to add variable through themenaame_preprocess_panels_pane, but it doesn't appear in .tpl.php file.

Code

function dmitriyv_preprocess_panels_panedmits_preprocess_panels_pane(&$vars){

$vars['custom_article_class'] = 'seriveces-wrapp'; kpr($vars);

}

How to add html to wrap custom panels layout programaticly? I know that i can change html in *.tpl.php but i want to avoid it. Also i want to know, how to add class to panals programaticly too.

UPD: I create custom panels layout and want to add html with custom class to wrapp regions of custom panel layout. I found good decision to use module Semantic panels, but it add markup to field, not to whole region.

This is part of my html

 <?php if ($content['left'] || $content['middle'] || $content['middle_two'] || $content['right']): ?>
    <div class="row"> 
         <div class="col-xs-12 col-md-3 col-lg-3">
            <?php print $content['left']; ?>
         </div>
    </div>
  <?php endif ?>

I want to make it like that

 <?php if ($content['left'] || $content['middle'] || $content['middle_two'] || $content['right']): ?>
    <div class="row">
         <div class="col-xs-12 col-md-3 col-lg-3">
           <article class="$custom_class">
            <?php print $content['left']; ?>
           </article>
         </div>
         
    </div>
  <?php endif ?>

UPD2: I try to add variable through themenaame_preprocess_panels_pane, but it doesn't appear in .tpl.php file.

Code

function dmitriyv_preprocess_panels_pane(&$vars){

$vars['custom_article_class'] = 'seriveces-wrapp'; kpr($vars);

}

How to add html to wrap custom panels layout programaticly? I know that i can change html in *.tpl.php but i want to avoid it. Also i want to know, how to add class to panals programaticly too.

UPD: I create custom panels layout and want to add html with custom class to wrapp regions of custom panel layout. I found good decision to use module Semantic panels, but it add markup to field, not to whole region.

This is part of my html

 <?php if ($content['left'] || $content['middle'] || $content['middle_two'] || $content['right']): ?>
    <div class="row"> 
         <div class="col-xs-12 col-md-3 col-lg-3">
            <?php print $content['left']; ?>
         </div>
    </div>
  <?php endif ?>

I want to make it like that

 <?php if ($content['left'] || $content['middle'] || $content['middle_two'] || $content['right']): ?>
    <div class="row">
         <div class="col-xs-12 col-md-3 col-lg-3">
           <article class="$custom_class">
            <?php print $content['left']; ?>
           </article>
         </div>
         
    </div>
  <?php endif ?>

UPD2: I try to add variable through themenaame_preprocess_panels_pane, but it doesn't appear in .tpl.php file.

Code

function dmits_preprocess_panels_pane(&$vars){

$vars['custom_article_class'] = 'seriveces-wrapp'; kpr($vars);

}

added 6 characters in body
Source Link
Vlk
  • 31
  • 4

How to add html to wrap custom panels layout programaticly? I know that i can change html in *.tpl.php but i want to avoid it. Also i want to know, how to add class to panals programaticly too.

UPD: I create custom panels layout and want to add html with custom class to wrapp regions of custom panel layout. I found good decision to use module Semantic panels, but it add markup to field, not to whole region.

This is part of my html

 <?php if ($content['left'] || $content['middle'] || $content['middle_two'] || $content['right']): ?>
    <div class="row"> 
         <div class="col-xs-12 col-md-3 col-lg-3">
            <?php print $content['left']; ?>
         </div>
    </div>
  <?php endif ?>

I want to make it like that

 <?php if ($content['left'] || $content['middle'] || $content['middle_two'] || $content['right']): ?>
    <div class="row">
         <div class="col-xs-12 col-md-3 col-lg-3">
           <article class="$custom_class">
            <?php print $content['left']; ?>
           </article>
         </div>
         
    </div>
  <?php endif ?>

UPD2: I try to add variable through themenaame_preprocess_panels_pane, but it doesn't appear in .tpl.php file.

Code

function dmitriyv_preprocess_panels_pane(&$vars){

$vars['custom_article_class'] = 'seriveces-wrapp'; kpr($vars);

}

How to add html to wrap custom panels layout programaticly? I know that i can change html in *.tpl.php but i want to avoid it. Also i want to know, how to add class to panals programaticly too.

UPD: I create custom panels layout and want to add html with custom class to wrapp regions of custom panel layout. I found good decision to use module Semantic panels, but it add markup to field, not to whole region.

This is part of my html

 <?php if ($content['left'] || $content['middle'] || $content['middle_two'] || $content['right']): ?>
    <div class="row"> 
         <div class="col-xs-12 col-md-3 col-lg-3">
            <?php print $content['left']; ?>
         </div>
    </div>
  <?php endif ?>

I want to make it like that

 <?php if ($content['left'] || $content['middle'] || $content['middle_two'] || $content['right']): ?>
    <div class="row">
         <div class="col-xs-12 col-md-3 col-lg-3">
           <article class="$custom_class">
            <?php print $content['left']; ?>
           </article>
         </div>
         
    </div>
  <?php endif ?>

UPD2: I try to add variable through themenaame_preprocess_panels_pane, but it doesn't appear in .tpl.php file.

Code

function dmitriyv_preprocess_panels_pane(&$vars){

$vars['custom_article_class'] = 'seriveces-wrapp'; kpr($vars);

}

How to add html to wrap custom panels layout programaticly? I know that i can change html in *.tpl.php but i want to avoid it. Also i want to know, how to add class to panals programaticly too.

UPD: I create custom panels layout and want to add html with custom class to wrapp regions of custom panel layout. I found good decision to use module Semantic panels, but it add markup to field, not to whole region.

This is part of my html

 <?php if ($content['left'] || $content['middle'] || $content['middle_two'] || $content['right']): ?>
    <div class="row"> 
         <div class="col-xs-12 col-md-3 col-lg-3">
            <?php print $content['left']; ?>
         </div>
    </div>
  <?php endif ?>

I want to make it like that

 <?php if ($content['left'] || $content['middle'] || $content['middle_two'] || $content['right']): ?>
    <div class="row">
         <div class="col-xs-12 col-md-3 col-lg-3">
           <article class="$custom_class">
            <?php print $content['left']; ?>
           </article>
         </div>
         
    </div>
  <?php endif ?>

UPD2: I try to add variable through themenaame_preprocess_panels_pane, but it doesn't appear in .tpl.php file.

Code

function dmitriyv_preprocess_panels_pane(&$vars){

$vars['custom_article_class'] = 'seriveces-wrapp'; kpr($vars);

}

added 245 characters in body
Source Link
Vlk
  • 31
  • 4

How to add html to wrap custom panels layout programaticly? I know that i can change html in *.tpl.php but i want to avoid it. Also i want to know, how to add class to panals programaticly too.

UPD: I create custom panels layout and want to add html with custom class to wrapp regions of custom panel layout. I found good decision to use module Semantic panels, but it add markup to field, not to whole region.

This is part of my html

 <?php if ($content['left'] || $content['middle'] || $content['middle_two'] || $content['right']): ?>
    <div class="row"> 
         <div class="col-xs-12 col-md-3 col-lg-3">
            <?php print $content['left']; ?>
         </div>
    </div>
  <?php endif ?>

I want to make it like that

 <?php if ($content['left'] || $content['middle'] || $content['middle_two'] || $content['right']): ?>
    <div class="row">
         <div class="col-xs-12 col-md-3 col-lg-3">
           <article class="$custom_class">
            <?php print $content['left']; ?>
           </article>
         </div>
         
    </div>
  <?php endif ?>

UPD2: I try to add variable through themenaame_preprocess_panels_pane, but it doesn't appear in .tpl.php file.

Code

function dmitriyv_preprocess_panels_pane(&$vars){

$vars['custom_article_class'] = 'seriveces-wrapp'; kpr($vars);

}

How to add html to wrap custom panels layout programaticly? I know that i can change html in *.tpl.php but i want to avoid it. Also i want to know, how to add class to panals programaticly too.

UPD: I create custom panels layout and want to add html with custom class to wrapp regions of custom panel layout. I found good decision to use module Semantic panels, but it add markup to field, not to whole region.

This is part of my html

 <?php if ($content['left'] || $content['middle'] || $content['middle_two'] || $content['right']): ?>
    <div class="row"> 
         <div class="col-xs-12 col-md-3 col-lg-3">
            <?php print $content['left']; ?>
         </div>
    </div>
  <?php endif ?>

I want to make it like that

 <?php if ($content['left'] || $content['middle'] || $content['middle_two'] || $content['right']): ?>
    <div class="row">
         <div class="col-xs-12 col-md-3 col-lg-3">
           <article class="$custom_class">
            <?php print $content['left']; ?>
           </article>
         </div>
         
    </div>
  <?php endif ?>

How to add html to wrap custom panels layout programaticly? I know that i can change html in *.tpl.php but i want to avoid it. Also i want to know, how to add class to panals programaticly too.

UPD: I create custom panels layout and want to add html with custom class to wrapp regions of custom panel layout. I found good decision to use module Semantic panels, but it add markup to field, not to whole region.

This is part of my html

 <?php if ($content['left'] || $content['middle'] || $content['middle_two'] || $content['right']): ?>
    <div class="row"> 
         <div class="col-xs-12 col-md-3 col-lg-3">
            <?php print $content['left']; ?>
         </div>
    </div>
  <?php endif ?>

I want to make it like that

 <?php if ($content['left'] || $content['middle'] || $content['middle_two'] || $content['right']): ?>
    <div class="row">
         <div class="col-xs-12 col-md-3 col-lg-3">
           <article class="$custom_class">
            <?php print $content['left']; ?>
           </article>
         </div>
         
    </div>
  <?php endif ?>

UPD2: I try to add variable through themenaame_preprocess_panels_pane, but it doesn't appear in .tpl.php file.

Code

function dmitriyv_preprocess_panels_pane(&$vars){

$vars['custom_article_class'] = 'seriveces-wrapp'; kpr($vars);

}

added 944 characters in body
Source Link
Vlk
  • 31
  • 4
Loading
added 68 characters in body
Source Link
Vlk
  • 31
  • 4
Loading
Source Link
Vlk
  • 31
  • 4
Loading