1

I'm trying to add use bootstrap modal and bootstrap slideshow to show a view but the slideshow doesn't work the way I want it because of the default generated divs by Views module. Here is the code:

    <div id="block-views-custom-package-form-venue-option" class="block block-views">
        <div class="content">
            <div class="item active">
                <div class="carousel-caption">
                    <h4>heading 1</h4>
                    <p>This is the description.</p>
                </div>
            </div>
            <div class="item">
                <div class="carousel-caption">
                    <h4>heading 2</h4>
                    <p>This is the description.</p>
                </div>
            </div>
        </div>
    </div>  

I want the result of the view supposedly like this:

<div class="item active">
        <div class="carousel-caption">
        <h4>heading 1</h4>
        <p>This is the description.</p>
    </div>
</div>
<div class="item">
    <div class="carousel-caption">
        <h4>heading 2</h4>
        <p>This is the description.</p>
    </div>
</div>

Only the output of the view with no views default generated divs.

  • finally do you solve your problem? If one of the answer help you, you can check it as accepted ;-) – – Adrian Cid Almaguer Jul 25 '16 at 15:15
2

Go to the Settings of your Fields and uncheck the Option: Provide default field wrapper elements

enter image description here

| improve this answer | |
1

Use semantic views module to strip tags

This Views plugin makes unformatted styles, field row styles and other output more readily configurable without needing to override template files. Instead of overriding row style templates for views where you want to specify different HTML elements (tags) and class attributes, you can specify these inside the Views UI and avoid overriding templates for each view.

| improve this answer | |
1

You can markup anything you'd like in views theming information. See the attached picture below.

Create a .tpl file using the "Display output". The highlighted ones are being used or the default ones. See below on how to do it:-

  • Create a .tpl file using the theme suggestions in the display output eg. "views-view--machinename--page.tpl.php".
  • Click the "Rescan template files". (The views-view--machinename--page.tpl.php will be highlighted when you've created it properly).
  • Click the "Display output" link.
  • Copy the opening php tags until at the end of its php tags, then paste that in "views-view--machinename--page.tpl.php".
  • Click the OK button, then Flush all caches.

enter image description here

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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