Jump to content
  • 0

Как скрыть пустую кастомную вкладку


Haywood Rig
 Share
Followers 0

Question

Привет, в постах темы у пользователей под аватаркой сделал кастомные вкладки. Как то можно реализовать так же, как на картинке? Если вторая вкладка у пользователя пустая (к примеру доп поле пользователя не заполнено), то отображать только первую (которая изначально активная), а вторую вкладку скрывать. 

Пример на картинке:

Скрытый текст

164505142_2021-04-29131611.thumb.png.3262299eabee885255a8b0089b8e052b.png

 

<div id="tab_info">
      <div class="ipsTabs ipsTabs_small ipsTabs_stretch ipsClearfix" id="blocksTab_{$comment->$idField}" data-ipstabbar="" data-ipstabbar-contentarea="#blocksTab_{$comment->$idField}_content">
   <a href='#blocksTab_{$comment->$idField}' data-action='expandTabs'><i class='icon-caret-down'></i></a>
   <ul role='tablist'>
      <li role='presentation'>
         <a href="#" role='tab' id='blocksTab_{$comment->$idField}_forums' class='ipsTabs_item ipsType_center ipsTabs_activeItem' aria-selected="true">Информация</a>
      </li>
      <li role='presentation'>
         <a href="#" id='blocksTab_{$comment->$idField}_orion' role='tab' class='ipsTabs_item ipsType_center'>Группы</a>
      </li>
   </ul>
</div>
<div id="blocksTab_{$comment->$idField}_content" class="ipsTabs_panels">
   <div id="ipsTabs_blocksTab_{$comment->$idField}_blocksTab_{$comment->$idField}_forums_panel" class="ipsTabs_panel" style="" aria-hidden="" animating="false">
      <div class="ipsWidget_inner">
         <div class="ipsPad_half" id="scroll_streams">
            <ul class="ipsDataList ipsDataList_reducedSpacing" id="results">	
           {{$fields = $comment->author()->contentProfileFields();}}
{{$field2 = $fields['core_pfieldgroups_5']['core_pfield_8'];}} 
          $field2 
           
           {{$fields = $comment->author()->contentProfileFields();}}
{{$field1 = $fields['core_pfieldgroups_5']['core_pfield_9'];}} 
          $field1
              
    		
           </ul>
         </div>
      </div>
   </div>
   <div id="ipsTabs_blocksTab_{$comment->$idField}_blocksTab_{$comment->$idField}_orion_panel" class="ipsTabs_panel" style="" aria-hidden="" animating="false">
      <div class="ipsWidget_inner">
         <div class="ipsPad_half"  id="scroll_streams">
            <ul class="ipsDataList ipsDataList_reducedSpacing" id="results2">	</ul>
         </div>
      </div>
   </div>
</div>
        </div>

 

Link to post
Share on other sites
  • Answers 1
  • Created
  • Last Reply

Top Posters For This Question

Top Posters For This Question

1 answer to this question

Recommended Posts

  • 0
  • VIP client

Можно ссылку на этот форум. 

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share
×
×
  • Create New...

Important Information

Privacy Policy We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.