Topic: [Solved]Working on the snippset that listing specific blocks.
Hi, it maybe silly to ask (or maybe not), but as I'm a front-end dev with close to zero PHP skill (more of a designer with some basic front-end skill - at work I never have the need to touch the code, only design on Photoshop), this is what I encounter when working with Monstra:
I currently working on this site for a friend: http://fionabenjamin.com/ (static html/css based on Bolt bootstrap theme by blacktie.co)
And there's a section here that I don't know how to do (actually there's a lot of other part but if I can figure how to do this one, the rest is less likely a problem): Frequently Asked Questions in the services page.
There is a warp, then a header, yep no problem to convert into monstra's template...
Then there's items here:
<div id="lg"> <div class="container"> <div class="row centered"> <h4>Frequently Asked Questions</h4> <div class="col-lg-4"> <h4><i class="fa fa-question-circle"></i></h4> <p class="QnA"> <b>What kinds of questions can I ask?</b><br> Anything that does not involve asking about minors or death (i.e How/When will I die?). </p> </div> ... (and many more items like the one above) </div><!-- row --> </div><!-- container --> </div><!-- dg -->
So... according to my knowledge through the tutorial video by monstrathemes and skipping through the documents. I think this will go down as making that code above into a snippset and replace the content of the QnA paragraph with a block, right?
<div class="col-lg-4"> <h4><i class="fa fa-question-circle"></i></h4> <p class="QnA"> {snippet get="the-block-i-want"} </p> </div>
If I set out to fix the number of block then there's no problem. But what if I want it to be dynamic, each of col-lg-4 divs above into a snippset and have a bigger snippset that get all of them so if there's not 6 but 3 or 9 or 12 QnA blocks, they will all get display without the need to change the snippset code, like how a blog display it own posts? You guy have a blog plugin so I think it very possible (maybe very easy to do), but, that's where I stuck right now.
Something that will generate something like this:
<div class="col-lg-4"> <h4><i class="fa fa-question-circle"></i></h4> <p class="QnA"> {snippet get="the-first-of-those-blocks-i-want"} </p> </div> <div class="col-lg-4"> <h4><i class="fa fa-question-circle"></i></h4> <p class="QnA"> {snippet get="the-second-of-those-blocks-i-want-if-they-have-a-second-one"} </p> </div> ...
PS: Also, I also has the 4 item to sell above with 4 variables needed for each of them: special, name, price, paypal code. If I able to get the snippset that read block and extract data from it, like this:
NEW 60<br>Minute<br>Reading 60 xxxxHS87BT8ZS
So I don't have to make four block with just one word inside it for just one item.
But if I have to, it's okay, no problem at all, just focus on my main problem above
Hope this one is not being asked before, or my search skill totally sucks, in that case, I will be very happy to get a link into older topic.
Thanks for reading.