All right, kids, I had so much fun messing around with menus
, now it's time for Blocks. Blocks: You can stack them. On #Hubzilla
you can also fill them with things.
Travel to your Blocks page. It'll be here:
. I'm going to make a block with some text in it first.
Hit the green Create button and you'll notice the interface looks suspiciously like the box you write entries in, complete with blue Share button and preview eyeball. Since you can style this text, I'm going to make a list based on the 1985 They Might Be Giants song "(Put Your Hand Inside The) Puppet Head."
You'll see I selected HTML. That's because it's seemingly the only language Hubzilla will recognize for lists. You can also choose BBcode, Markdown, Text, or Comanche Layout. I named my block "tmbg," and gave it a title (optional) of "They Might Be Giants" just to see what it would look like. Then I added my code. I typed it out for those of you who can't see/read the image, but Hubzilla mangled it despite the code tag, so I cut it. It's an ordered list in HTML with two items.
I previewed. Hubzilla recognized my list and everything looked good, so I hit Share. Don't be scared when you hit Share; you're not actually sharing it with anyone and it doesn't go anywhere public. That'll keep for the moment. Next I want a nice block with a picture of Kirk and Spock in it. You can either upload a photo right from here, using the "attach/upload file" button like you do when making a post, or you can pick an image already in your albums.
I'm going to select a photo I already have uploaded and name the block "spirk." So I've got my two new blocks. Let's go fire up the old PDL editor and hassle my layout. The PDL editor, if you're just joining us, is an app you can install
that lets you change the layout of site pages. You'll need to have it installed for the next step.Here we are in the PDL
. I'm going to click on channel
. Now, this is a lot like adding a bookmark menu to your layout
, except we're adding blocks instead of menus. Here's what I did:
So you take the name of your block, and then just surround it with the block tag, like so:
Then squeeze it in between two elements that sound familiar to you. I'm putting my picture of Kirk and Spock up at the very top of the right hand column, even before the notifications element. And I'm putting my TMBG block on the same side, but below the notifications. Hit Submit to save. Remember, if you mess up in here so badly you can't begin to fix it, on the main PDL editor page
it will say "(modified)" next to any layout you've messed with, and then it will say "Reset" and you can just click on reset and all your self-made PDL problems will disappear.
Let's go look at my home channel now:
I'm happy to report that Hubzilla will automatically resize your image so it doesn't take over your whole page like a terrible square amoeba. That looks so good I want Kirk and Spock to keep me company on my network feed too. So I'll just take that same line of code and add it to my network layout. Now Kirk and Spock are with me all the time.
If you have the bookmark app installed, you can save this post by clicking on the bookmark icon: how to add custom blocks to your layout