Page 1 of 2 12 LastLast
Results 1 to 10 of 16
  1. #1
    Join Date
    Mar 2008
    Posts
    15
    Plugin Contributions
    0

    Default add text on main page under "new products for.." box

    hello,
    any ideas how to place text on main page under the "New products for..." box. I've tried with the define pages editor, define main page, but the matter is the text appears above the "New products for..." box and i need to place it below...
    thnks in advance ;)


    http://www.smokers-heaven.co.uk

  2. #2
    Join Date
    Mar 2008
    Location
    Cape Town & London (depends on the season)
    Posts
    2,975
    Plugin Contributions
    0

    Default Re: add text on main page under "new products for.." box

    Do you want the text to display ONLY on the Main Page*, and ONLY if you have enabled "New Products " to be displayed?

    * You can also elect to have "New Products" box appear elsewhere - such as on Product Listing page... do you want text to appear there too?

  3. #3
    Join Date
    Mar 2008
    Location
    Cape Town & London (depends on the season)
    Posts
    2,975
    Plugin Contributions
    0

    Default Re: add text on main page under "new products for.." box

    Knock, Knock...

    ... I have a potential solution for you, but need an answer to the above...

  4. #4
    Join Date
    Mar 2008
    Posts
    15
    Plugin Contributions
    0

    Default Re: add text on main page under "new products for.." box

    sorry, i didn' t expect such a quick reply ;)
    i need the text to appear only on the main page in the center and below the "new products for.." box. this would be a small article re smoking, which would have a link at the end to a page in my site which would contain other interesting facts and articles! 10x

    http://www.smokers-heaven.co.uk

  5. #5
    Join Date
    Mar 2008
    Location
    Cape Town & London (depends on the season)
    Posts
    2,975
    Plugin Contributions
    0

    Default Re: add text on main page under "new products for.." box

    Okay... but my principal question remains...

    As it's possible to "switch off" the display of "New Products" on the index page, the method we use to incorporate this block of text is important.

    Remember also, that (depending on settings), the New Products Box can "switch itself off" too (for example, if you choose to set new products display to products less than 30-days old, the box will disappear automatically if you don't add any new products within this time limit.)

    So...

    1. If we incorporate the additional text feature WITHIN the New Products Box, it will appear and disappear along with the box.

    2. If you want the text to be there, regardless of whether the New Products Box is "on" or "off", we need to configure it slightly differently.

    Please indicate what you would like it to do...

  6. #6
    Join Date
    Mar 2008
    Posts
    15
    Plugin Contributions
    0

    Default Re: add text on main page under "new products for.." box

    second option. i need the text in the page regardless of the status of the "new products for..." box! 10x for the quick reply ;)

    http://www.smokers-heaven.co.uk

  7. #7
    Join Date
    Mar 2008
    Location
    Cape Town & London (depends on the season)
    Posts
    2,975
    Plugin Contributions
    0

    Default Re: add text on main page under "new products for.." box

    1. Find the following line (near line 640) in includes\languages\YOUR-TEMPLATE\english.php

    PHP Code:
    ///////////////////////////////////////////////////////////
    // include email extras 
    Directly ABOVE it, put this:-

    PHP Code:
    // Special Text to appear whenever New Products are listed on Index Pages
      
    define('SPECIAL_TEXT''This is my special message to you.<br />Here is an example of a hyperlink in this text.<a target="_top" href="http://www.your-link.co.uk">Go here</a>'); 
    You will place your text and links as HTML between the single quotes. (So edit it as you would any define text).

    ------------------------------------------------------

    2. Make a COPY on your HARD DRIVE of:-

    includes\templates\template_default\templates\tpl_index_default.php

    Open this copy to EDIT, and RIGHT AT THE BOTTOM of the file, place this:-

    PHP Code:
    <!--SPECIAL TEXT BLOCK START-->
    <?php if (SPECIAL_TEXT) { ?>
    <div id="" class="specialTextBlock"><?php echo SPECIAL_TEXT?></div>
    <?php ?>
    <!--SPECIAL TEXT BLOCK END-->

    So the last few lines of that php look like this:-
    PHP Code:
    <?php
      $show_display_category
    ->MoveNext();
    // !EOF
    ?>
    </div>

    <!--SPECIAL TEXT BLOCK START-->
    <?php if (SPECIAL_TEXT) { ?>
    <div id="" class="specialTextBlock"><?php echo SPECIAL_TEXT?></div>
    <?php ?>
    <!--SPECIAL TEXT BLOCK END-->
    SAVE the file (on your hard drive) then FTP it to:-

    includes\templates\YOUR-TEMPLATE\templates\tpl_index_default.php

    (YOUR-TEMPLATE is probably "classic", so you may need to create a sub-folder called "templates" in there.

    includes\templates\classic\templates\tpl_index_default.php

    -----------------------------------------------------------


    STYLESHEET:


    As this "DIV" has its own ID, (div id="" class="specialTextBlock") you can apply styles to it in the stylesheet.

    -----------------------------------------------------------

  8. #8
    Join Date
    Mar 2008
    Posts
    15
    Plugin Contributions
    0

    Default Re: add text on main page under "new products for.." box

    done with ease due to your great explanation!!!! two final questions and i promise not to take of your time anymore:
    1. will this text dissapear if the "new products for.." box is off?
    2. i want to add a text that is say one or two passages. how do i do that? i've tested entering several sentences and the result is that the main page looks completely mixed up!
    thanks again!

    http://www.smokers-heaven.co.uk/

  9. #9
    Join Date
    Mar 2008
    Location
    Cape Town & London (depends on the season)
    Posts
    2,975
    Plugin Contributions
    0

    Default Re: add text on main page under "new products for.." box

    1. The text will NOT disappear when the new products display box is OFF (unless you have made other changes to tpl_ index_default.php)

    The TEXT you enter here (my example below in RED) can be formatted as simple HTML. I use <br /> tags to split lines and my hyperlink opens up in a new window through target="_top".

    You can format the html to your own needs.

    define('SPECIAL_TEXT', 'This is my special message to you.<br />Here is an example of a hyperlink in this text.<a target="_top" href="http://www.your-link.co.uk">Go here</a>');

    You can also apply STYLES to this as I have given it a DIV ID of: specialTextBlock

  10. #10
    Join Date
    Dec 2004
    Posts
    1,031
    Plugin Contributions
    0

    Default Re: add text on main page under "new products for.." box

    I am looking for exactly the same but did not work for me. I can't see any text below my category pictures.

    Will this work with defines text above the categories on my main page and then your solution for text below the categories?

    I did everything as instructed.
    Live and learn... the Zen way.

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. Changing width of "New Products" listing under main content(different for me?)
    By curbsidestudiosNET in forum Templates, Stylesheets, Page Layout
    Replies: 8
    Last Post: 27 Feb 2011, 12:16 AM
  2. Anchor text in "new products for" box
    By bhakans in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 3 Nov 2008, 10:21 AM
  3. Turn off "New Products box" on main page
    By bumba000 in forum General Questions
    Replies: 1
    Last Post: 12 Nov 2007, 05:53 AM
  4. Need help changing text size for: "Congratulations" & "Welcome Guest" on main page
    By STFlats in forum Templates, Stylesheets, Page Layout
    Replies: 12
    Last Post: 16 Apr 2007, 04:32 AM
  5. Quick question about text colour for "New Products" on main page
    By monkeybrains in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 3 Aug 2006, 06:00 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg