Question

Photo of Keith Pavia

0

Sub Features on Home Page

I have added 1 subfeature on our home page.  I shows up under the first 3 that were already on the page.  My question is, can I reduce the size of all of the sub feature blocks so that all 4 of them show up under the Ad Rotator?  I hope this makes sense.

  • Michael Garrison

    Keith, I assume you're talking about the "Ad"s on the Rock Solid Church page? /page/1 by default?


    I haven't tried to do this same thing, so forgive me for just guessing. First, have you checked the Ad block properties? There's a "Maximum Items" setting in there- does increasing it from 3 to 4 make a difference? Guessing not, you're going to need to change the classes of each of the four ads. If you're not familiar with Bootstrap, they work on a system of 12 columns, so if you want three ads next to each other, each ad is 4 columns wide. You need to switch to 3 columns wide so that 4 will fit next to each other. Look in the HTML for something like the following: <div class="col-md-4 col-sm-6 announcement"> and try changing it to <div class="col-md-3 col-sm-5 announcement"> instead, on each of your four ads.

  • Michael Garrison

    Well, now you've got me wondering, so I went looking. It looks like the "Ad List" block type is defined in ~/blocks/cmd/adlist.ascx, but that string isn't in that file...must be in one of the includes. And I assume actually hacking changes into the files which comprise Rock is probably not a good idea- any upgrade to Rock could presumably overwrite your changes. So I'll step aside and let someone who knows what they're talking about try and help...and keep an eye on the topic since I'm sure I'll eventually get far enough along with Rock to want to customize things on that granular a level myself =)

  • Michael Garrison

    OK, I figured it out; it's in the Liquid file for the specific theme you're using.


    My guess is that the developers would recommend that you create your own theme (like I said I'm not that far along yet, but maybe there's the concept of a "child" theme in Rock?) based on the existing theme, so that you can safely edit whatever you want without fear of it being overwritten in an update.


    But here's how you can change it right now...one more time I must warn you that IF YOU FOLLOW THESE INSTRUCTIONS EXACTLY, YOU MUST ASSUME THAT YOUR CHANGES WILL BE OVERWRITTEN. You've been warned.



    1. On the server, you need to open ~\Themes{theme}\Assets\Liquid (where {theme} is whatever theme your site is using...by default the Rock Solid Church site is using Stark, I believe).

    2. In line 4, replace "col-md-4" with "col-md-3".

    3. Now, the developers insert a hard break manually after 3 ads instead of letting Bootstrap wrap extra ads onto the next line automatically for some reason (I'm sure there's a reason), so you need to tell it to insert that break after 4 ads instead. So on line 24 of that file, change Modulo:3 to Modulo:4.

    4. Save and close that file.

    5. Refresh your site, and viola!

  • Keith Pavia

    Do you suggest using the default Rock Solid Church theme? I did not realize that there are others to choose from. Also, can you change a theme without affecting your site too much (Loosing stuff that is)?

  • Keith Pavia

    Michael, I tried your suggestion and it worked perfectly. I can not mark this as answered, since you did not write it up that way. but thank you! I am not sure what that did, but it worked. Obviously, I am not a programmer...

  • Jon Edmiston

    To add to Michael's comment, which is right on, I would first copy and paste the Stark theme to create a new theme with a name of your choosing. It's likely/certain that we will be updating the Stark theme over time and your changes will get overwritten. Once you make the new theme all you need to do to use it is to go to "Admin Tools > CMS Configuration > Sites" and change the theme (to your new one) on the "Rock Solid Church" site. Feel free to give it a new name while you're there.

  • Keith Pavia

    Jon, do I do that by just copying the Stark folder? Or is there a way to do it using the RMS GUI? Will I loos any content or formatting by doing this?


    Also, is there a way to see what other templates look like before applying them?

  • Nick Airdo

    Do it like Jon describes by copying the folder. There actually is a sort of hidden way to let you 'preview' a theme. Just append the name-value parameter theme=<YourThemeName> to your URL with a ? like this "http://foo.com/?theme=stark" or with the & like this "http://foo.com/?somex=thingy&theme=stark" if there are already parameters in the URL. Just realize that it cookie-caches it for you (and only you) so if you want to reset it back to the original you have to browser flush your cookies or use the theme=<OriginalThemeName> trick to set it back.

  • Photo of Michael Garrison

    1

    Here's how you can change it...one more time I must warn you that IF YOU FOLLOW THESE INSTRUCTIONS EXACTLY, YOU MUST ASSUME THAT YOUR CHANGES WILL BE OVERWRITTEN. You've been warned. See Jon's instructions for creating a duplicate template first so that doesn't happen.

    1. On the server, you need to open ~\Themes\{theme}\Assets\Liquid (where {theme} is whatever theme your site is using...by default the Rock Solid Church site is using Stark, I believe).
    2. In line 4, replace "col-md-4" with "col-md-3".
    3. Now, the developers insert a hard break manually after 3 ads instead of letting Bootstrap wrap extra ads onto the next line automatically for some reason (I'm sure there's a reason), so you need to tell it to insert that break after 4 ads instead. So on line 24 of that file, change Modulo:3 to Modulo:4.
    (Note that my understanding, and experience, of Bootstrap is that if there are more columns than fit in the 12 column grid, it will flow onto the next line on it's own, so if you're doing this on your own template, you can experiment with deleting this line entirely to clean up things for future modifications if you'd like)
    4. Save and close that file.
    5. Refresh your site, and viola!

     

    • Nick Airdo

      Good answer and good point regarding the practice of creating your own template (that stark website template is meant to be copied and is only a starting point for a good website design).

  • Photo of Keith Pavia

    0

    Hi Michael,

    I am having the same issue now that we went to lava.  I found the AdList.lava file, and assume that I can make the same changes there.  Is this True?  If so, can I make similar changes to get 5 images instaed of 3 or 4?

    What is your step 2 above doing?