1

I am trying to accomplish the following in a views accordion style.

enter image description here

Here is what I am putting in the rewrite field

<div class="session-date">[field_event_date_1]</div>
<div class="session-title">[title]</div> 
<div class="session-timeslot">[field_time_slot_1]</div> 

Here is what gets rendered

<div class="panel-heading">
    <h4 class="panel-title">
      <a class="accordion-toggle views-ajax-processed-processed" data-toggle="collapse" data-parent="#views-bootstrap-accordion-1" href="#collapse0">
        Tuesday, November 3, 2015 
Example title description goes here
1A - 10:00 - 11:30 AM 
      </a>
    </h4>
  </div>

enter image description here

HTML5 spec allows div styling in anchors. Can anyone point me in the right direction?

1
  • If you don't use accordion, does the cessions classes get rendered?
    – No Sssweat
    Sep 14, 2015 at 1:41

2 Answers 2

1

If this was purely about just views accordian, then the rendering output you show would not be showing a div with a class of panel-heading. I see this as more likely about trying to have a views accordian rewrite into a panel and probably panels accordian at the same time and having the anchor tag reduced to a single line output when the html is stripped out. So without knowing what the full details are I can only suggest trying the rewrite as:

[field_event_date_1]
[title]

[field_time_slot_1]

or if only the div tags are being stripped out then try:

<div class="session-date">[field_event_date_1]</div><br/>
<div class="session-title">[title]</div><br/>
<p><div class="session-timeslot">[field_time_slot_1]</div></p>
1

I was using bootstrap accordion which the module strips out any markup. Although I could hardcode the example, it was pointless to do so in that module. I ended up changing my styling and using views accordion which allowed more grouping options.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.