Inline styling in the {title}

For discussion and questions related to CMS Specific templates and stylesheets (CSS), and themes. or layout issues. This is not a place for generic "I don't know CSS issues"
Post Reply
cnisvcs
Forum Members
Forum Members
Posts: 37
Joined: Wed Jan 30, 2008 3:02 am

Inline styling in the {title}

Post by cnisvcs »

This has been probably explained already, but I couldn't find a solution.

I would like to add the inline styling into the {title} tag to bold or italicize selected words. For example, I would like to see:

Company Name Home Page

which, typically, I would accomplish by entering:

Company Name Home Page

but the site replaces all brackets with their entities < and >

Is there a way around it? Please advise. Thank you.
User avatar
Darwin Web Design
Forum Members
Forum Members
Posts: 212
Joined: Tue May 30, 2006 3:12 am

Re: Inline styling in the {title}

Post by Darwin Web Design »

I see no advantage to doing this. You would be better off using the H1 tag wrapped around your title tag and leave it at that. Using the word 'home page' is old fashioned.

The company name is probably in your website banner so a search engine friendly term describing the business would be more beneficial for your Heading1 than just the company name (not many people are going to search for the company name).

So in summary - I recommend to just use a search engine friendly title for the home page. The navigation and breadcrumbs will show that you are on the home page. The company name will be shown in your branding/logo plus the site title which also can be used to display on the browser page title.
cnisvcs
Forum Members
Forum Members
Posts: 37
Joined: Wed Jan 30, 2008 3:02 am

Re: Inline styling in the {title}

Post by cnisvcs »

Aussie,

I understand your argument. However, I used "Company Name Home Page" solely for the purpose of problem illustration. The client requested a specific word in the title to be in italics. I responded that it is not possible. However, I want to ascertain that it is, indeed, not possible. So, is it?
Zoorlat

Re: Inline styling in the {title}

Post by Zoorlat »

The {title}-tag needs to be stripped from html-tags since it is normally used in the -section of the page.

One way to achieve what you want would be to replace the {title} in the body of your template with a custom content block for the page header. Eg {content block='Page header' oneline=true}.

Another way is to simply omitt the {title} from the body of your template and let the client write the page header in the wysiwyg-box for{content}. That way they can choose to format it as they want.

Cheers
Z
cnisvcs
Forum Members
Forum Members
Posts: 37
Joined: Wed Jan 30, 2008 3:02 am

Re: Inline styling in the {title}

Post by cnisvcs »

Zoorlat,

You are right on target. If the client wants styling in the content heading, the {title} should not be used, rather {content block} instead, for the reasons you explained.

Thanks for clear explanation. Might help the others too.

Best regards.
Post Reply

Return to “Layout and Design (CSS & HTML)”