Zen Cart Logo
Forums / Customization from the Admin / Define Pages Editor Main Page line spacing

Define Pages Editor Main Page line spacing

Locked

Views: 2,951

Results 1 to 10 of 10
This thread is locked. New replies are disabled.
13 Sep 2009, 7:34 AM
#1
cherylam1103 avatar

cherylam1103

New Zenner

Join Date:
Sep 2009
Posts:
29
Plugin Contributions:
0

Define Pages Editor Main Page line spacing

Hello, quick question on how to change line spacing. I have edited the main page using the define pages editor writing two paragraphs and line space between the two in editor is one single line space.

Problem is when I look on site the space between the paragraphs looks to be more, like 1.5 line spacing. It's like there is setting somewhere for space before and space after paragraphs. Anyone know how I can fix this or what the spacing code is?

Thanks :smile:

13 Sep 2009, 8:29 AM
#2
schoolboy avatar

schoolboy

Totally Zenned

Join Date:
Jun 2005
Location:
Cumbria, UK
Posts:
10,327
Plugin Contributions:
0

Re: Define Pages Editor Main Page line spacing

The wysiwyg editors commonly bundled with zencart have many limitations, and there is no real solution to this. There's talk of moving away from HTMLArea and to TinyMCE, which is a better product.

So, you have to do stuff manually, and the easiest is to add custom <div id's> to your defined pages text, and then put these ID's into the stylesheet.

For example, if your home page text is a follows:


Welcome to my fantastic new store. Of all
the Zencart stores ever built, this one is by far the most beautiful,
creative, functionally perfect and worthy of every position in the
first 10 pages of a Google search result.

If you sign up today, I will give you $10,000 to spend as you wish
on any product. All shipping is absolutely free. All our products
come with a lifetime guarantee and are quite simply the best
product ever invented in the entire history of the world.


Your define page HTML could look like this:

<div id ="homePageWelcome">Welcome to my fantastic new store. Of all the Zencart stores ever built, this one is by far the most beautiful, creative, functionally perfect and worthy of every position in the first 10 pages of a Google search result.
<br />
<br />
If you sign up today, I will give you $10,000 to spend as you wish on any product. All shipping is absolutely free. All our products come with a lifetime guarantee and are quite simply the best product ever invented in the entire history of the world.</div>

As you see, I have encased the text in their own <DIV> to whiich I have applied my own custom style id...

<div id ="homePageWelcome">

If I now go to the stylesheet and add:

#homePageWelcome {
 color: #AD1400;
 line-height: 200%;
}

I will get:

Welcome to my fantastic new store. Of all

the Zencart stores ever built, this one is by far the most beautiful,

creative, functionally perfect and worthy of every position in the

first 10 pages of a Google search result.

If you sign up today, I will give you $10,000 to spend as you wish

on any product. All shipping is absolutely free. All our products

come with a lifetime guarantee and are quite simply the best

products ever invented in the entire history of the world.

13 Sep 2009, 8:37 AM
#3
schoolboy avatar

schoolboy

Totally Zenned

Join Date:
Jun 2005
Location:
Cumbria, UK
Posts:
10,327
Plugin Contributions:
0

Re: Define Pages Editor Main Page line spacing

Of course... as it's got its own style ID, you can configure the declarations however you wish.

line-height: 200% is just my example. If you want 150%, that's your choice.

13 Sep 2009, 12:23 PM
#4
cherylam1103 avatar

cherylam1103

New Zenner

Join Date:
Sep 2009
Posts:
29
Plugin Contributions:
0

Re: Define Pages Editor Main Page line spacing

Hi schoolboy,

Thanks for the fantastic explaination, very clear and I understand now will do that.

:clap:

13 Sep 2009, 1:35 PM
#5
cherylam1103 avatar

cherylam1103

New Zenner

Join Date:
Sep 2009
Posts:
29
Plugin Contributions:
0

Re: Define Pages Editor Main Page line spacing

Another question along same lines, can this type of code (div id) be done for the HEADING_TITLE in the index file? Tried but didn't work home page no longer displayed. Does it need to be done some other way because this title is in an 'elseif' statement?

:smile:

13 Sep 2009, 3:02 PM
#6
schoolboy avatar

schoolboy

Totally Zenned

Join Date:
Jun 2005
Location:
Cumbria, UK
Posts:
10,327
Plugin Contributions:
0

Re: Define Pages Editor Main Page line spacing

cherylam1103:

Another question along same lines, can this type of code (div id) be done for the HEADING_TITLE in the index file? Tried but didn't work home page no longer displayed. Does it need to be done some other way because this title is in an 'elseif' statement?

:smile:

You need to be more specific here.. What index.php file? The LANGUAGE file ...?

14 Sep 2009, 5:26 AM
#7
cherylam1103 avatar

cherylam1103

New Zenner

Join Date:
Sep 2009
Posts:
29
Plugin Contributions:
0

Re: Define Pages Editor Main Page line spacing

schoolboy:

You need to be more specific here.. What index.php file? The LANGUAGE file ...?

Yes sorry it is the language/english/index.php file.

14 Sep 2009, 5:36 AM
#8
cherylam1103 avatar

cherylam1103

New Zenner

Join Date:
Sep 2009
Posts:
29
Plugin Contributions:
0

Re: Define Pages Editor Main Page line spacing

cherylam1103:

Yes sorry it is the language/english/index.php file.

This is the section in that index file that I could like to maybe center, add line spacing to and change colour.

elseif ($category_depth == 'nested') {
// This section deals with displaying a subcategory
/Replace this line with the headline you would like for your shop. For example: 'Welcome to My SHOP!'/
define('HEADING_TITLE', 'Congratulations! You have successfully installed your Zen Cart™ E-Commerce Solution.');
}

Thanks :smile:

15 Sep 2009, 5:24 PM
#9
schoolboy avatar

schoolboy

Totally Zenned

Join Date:
Jun 2005
Location:
Cumbria, UK
Posts:
10,327
Plugin Contributions:
0

Re: Define Pages Editor Main Page line spacing

The following way is a crude hack, but it will work:

define('HEADING_TITLE', 'Congratulations! You have successfully installed your Zen Cart™ E-Commerce Solution.');

define('HEADING_TITLE', '<div id="congratsMessage">Congratulations! You have successfully installed your Zen Cart™ E-Commerce Solution.</div>');

(Then your stylesheet)...

#congratsMessage {
text-align: center;
color: #d4d4d4;
}

15 Sep 2009, 5:49 PM
#10
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Define Pages Editor Main Page line spacing

That text is already well identified. All you need to do is add to your stylesheet

h1#indexDefaultHeading {what: ever;}

The "Welcome Guest..." line can be controlled with

h2.greeting {what: ever;}