Making a foolproof content page

So I need to make a page for a client site that needs to have several product pictures with a description beside. This needs to be able to act responsive so on small screens the image will be above it's description.
I could do this using bootstrap rows and columns. But client will need to edit and add to the page. Can't have him dealing with all that stuff. So ideally we need to have the code hidden and then have client just deal with blocks. Could have a block per product, or all on one block.
Any ideas on this?
Thanks :slight_smile:

1 Like

Maybe code this page and then each product is a Block?

Hi, yes thats what I have done.

Works well and I have some pages in two columns and some inthree.
The problem comes when they want to add a product. Then there is no option but to dive into code.
A simple catalog system would be a great addition to Pulse.

I've done this in the past with a simple plugin to loop through all of the blocks in a given folder and output them to the page.

From memory here's a quick sample that should give you an idea of how this works;
$blocksdir = $tag_var1;
$files = glob("content/blocks/".$blocksdir . '/*.txt');
for ($i=0; $i < count($files); $i++){

Save this as allblocks.php in the inc/tags directory and call it using;


Quotes is the name of the folder in your blocks directory to display.

1 Like

Thats great Tim, thanks very much. I will have a play with that and see if I can use it.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.