Static Blocks

Permalink
I looked around, but I can't remember what the script for this looks like...

How does one place a static block on a single page?

For example, place a static ad block on a page type's theme or on a single page.

ijessup
 
ijessup replied on at Permalink Reply
ijessup
I should really stop posting so early in the morning :p

Any thoughts on the static block code? I know it exists, I just can't remember it off the top of my head.
ijessup replied on at Permalink Reply
ijessup
again. :p
bcarone replied on at Permalink Reply
bcarone
Can't you just use the html block?
frz replied on at Permalink Reply
frz
what does "static" even mean man?

you can place a block anywhere you want. bcarone is right, you can stick some HTML anywhere you want with the HTML block..

beyond that no one is answering your question because it's not clear what you're asking.
ijessup replied on at Permalink Reply
ijessup
I meant static as in, a block that is coded into a template, rather than pulled from the db.

Example:
An autonav block that statically coded into a header.php file which is included in all the other template file.

This way it is forced onto the page and cannot be removed or edited.

Make sense?
frz replied on at Permalink Reply
frz
thats possible but not really intended.

In that case I would turn on advanced permissions, put the auto nav in the header space through defaults, and lock that block down so only site admins, not site editors, could edit it..


look at it this way, that block has to exist somewhere, why would you want to create it somewhere hidden just so you can never easily edit it if you have the rights to?
bcarone replied on at Permalink Reply
bcarone
I think you could do this by adding your auto-nav into your header and making that section of the template editable by admin only. Read by everyone else.

How does that sound?

(edited) - Frz I guess I am actually learning this uh :) So get out of my head...You da man...I'm learning...I'm LEARNING!!!
ijessup replied on at Permalink Reply
ijessup
for a header element. Consequently, if I have elements/header.php included in default.php, full.php and whateverelse.php you have to edit each page type's defaults and permission settings to get the desired effect.

In theory, yes, setting the defaults of a page type is best practice, but editing element defaults is not a function of c5.

Also, after a page type's defaults have been edited, the existing pages associated to that page type do not take on the new default settings.

Both of which should definitely be a feature. Should I request them, or just continue to figure out how to insert a static block into a template with code?
frz replied on at Permalink Reply
frz
That's not the case. If you edit a block in defaults that is already used on pages throughout the site, the changes will be reflected throughout the site. It just won't automatically add a new block to old pages that follow the page type.

Perhaps using defaults with a single nav block you manage in global scrapbook would give you the ability to edit it once from scrapbook and have it reflected everywhere?
ijessup replied on at Permalink Reply
ijessup
Why doesn't it automatically add a new block to existing pages?