How do you implement substantial code snippets around a page title appearing on every page inside a block?

Permalink
I have a content block on each of my pages.

Each page has a page title inside this content block.

The page title is surrounded with HTML and CSS code to make a rounded corner box around the title (seehttp://hotstylecarpetcleaning.carlosgonzalezconsulting.com... for an example at the top where the page title is)

Now the problem is that I don't want to go in and change every single block containing the page title on each page on a site whenever something in such code sections changes.

But how do I surround the page title with the appropriate code otherwise?

The page title will always appear inside the block content.

In this particular case I could strip out the page title section of code and move it into the respective template rendering each page but that's not really a solution since I will want to use rounded corner boxes throughout various pages that will each have to be surrounded by the various DIV's that make up the rounded corners. I can't move all such boxes out into the template.

Anybody got any suggestions?

Carlos

 
jordanlev replied on at Permalink Best Answer Reply
jordanlev
If I'm understanding the situation correctly, this is a perfect use case for Designer Content:
http://www.concrete5.org/marketplace/addons/designer-content...

I did a site recently that had what sounds like a similar situation: I created a Designer Content block with only 1 textbox field, called it the "[Client Name] Page Title" block, and put all the necessary surrounding html/css as "static html" fields when building the block in designer content dashboard. Then I added this block to the Page Defaults and put default value for the textbox there as "Enter Page Title Here".
Now whenever a user adds a new page, they see that and know to click on it and choose "Edit", and they're presented with a simple textbox where they enter the title.

-Jordan
carlos123 replied on at Permalink Reply
Thanks for the reminder to check out your Add-On Jordan!

I'd forgotten about it in the middle of having to do other things. Will check it out today as it does sound exactly like what I am looking for!

If you don't mind answering a couple of questions for me Jordan...

- I notice it's presently free. If you are planning on charging something for it in the future will those who have gotten the free version have to then pay to get any future updates? I don't want to start using a free Add-On all over the place to only find myself having to pay for each use in the future.

- Secondly but no less of a concern for me...have you or anyone else noticed a slow down in web site page rendering through the use of your Add-On here? I mean whereas we might have one large content block on a page now, using your Add-On will exponentially increase the number of blocks on a page by splitting up that one big block into multiple little blocks. Each one needing access to the database. That has to slow things down some. I am just wondering how much with respect to whether that slow down is noticeable.

Any further input on those two concerns of mine would be appreciated Jordan.

Thanks again!

Carlos
jordanlev replied on at Permalink Reply
jordanlev
1) I have no plans to charge money for it.

2) I've never even thought about this. If having more than 1 block on a page is going to be a problem, well I'm not really sure why you'd use concrete5 in the first place since that's the whole point of the system -- if you only want/need 1 big content block on a page, honestly you should just build the site with Wordpress.
carlos123 replied on at Permalink Reply
Thanks for the input Jordan.

It's not so much that having more than one block on a page is a problem per se since one must use blocks (well...generally speaking) to allow C5 to be used as it was intended.

It's more that the more blocks I have on pages the more C5 must run queries against the MySQL database which slows it down. So I am trying to accomplish what I want with the minimum of blocks necessary.

Unfortunately C5 is turning out to be the number 1 slowest CMS I have ever used (though I have yet to implement some tweaks found on this forum to get it to go faster) and I am trying as hard as I can to keep that in check to avoid the need to switch to a different CMS altogether or go back to WordPress (the slowness of C5 really is that bad to the point of almost being a show stopper).

By the way, for anyone following this thread, Jordan's Designer Content Add-On is excellent and well worth installing from what I can see.

Carlos
tallacman replied on at Permalink Reply
tallacman
Hosting is a big part of having a fast site and there are plenty of cheap and speedy hosts with shared hosting. On the flip side there are a lot of slow ones too. Bluehost has demonstrated good speed as has Inmotionhosting and Dreamhost.

I constantly use Designer content and the generated code is very clean. You can always go into the view.php after the fact and add divs and spans to your hearts content if you want to change something.
carlos123 replied on at Permalink Reply
I use Hostgator tallacman so hosting wise, I think that's about as good of a shared host as one can find.

The first site I developed for a client, which site I am putting the finishing touches on, is real slow. Mind you I need to implement some things I found out about on this forum which should substantially speed it up but still...it's super slow out of the box so to speak.

Those things involve a fair bit of hacking which is not desirable but there is nothing I can do about that other than leave C5 which is too good at this point for me to go find another CMS to use.

Have no idea how C5 will run at GoDaddy which is way slower than Hostgator in my experience unless one gets on their case and insists on having the MySQL databases be put on a grid based server.

I don't want to hijack this thread to make it one about C5 slowness so that's all I'll basically say about that but thanks for your input taliacman.

Carlos