Results 1 to 6 of 6
  1. #1
    Join Date
    Dec 2006
    Posts
    107
    Plugin Contributions
    0

    Default Change layout in code, but not on page

    How easy would it be to change the layout of the page in the code but have it display normally on the page (ie. css putting everything back where it should be)?
    So that when you look at the source code for a page you see the footer first, then the body, then head, then side columns, but a visitor looking at the page sees everything in the normal order.

    Would this be a minor or major change? And if not major, which files should I start looking at?

    Cheers,
    Dave

  2. #2
    Join Date
    Feb 2005
    Location
    Lansing, Michigan USA
    Posts
    20,024
    Plugin Contributions
    3

    Default Re: Change layout in code, but not on page

    One of the things I like about being part of this forum is seeing all the different ways people want to use Zencart. But I can't imagine a reason you'd want to do that.

    That said, I think it would be difficult. CSS is good at stying and turning things on and off - moving stuff around on the page, not so much. You can easily move things on a page around by editing the PHP files, but I doubt if you'd be able to 'fix' them in the stylesheet.

    Remember, anyone who can see your source can also view your stylesheet.

  3. #3
    Join Date
    Dec 2006
    Posts
    107
    Plugin Contributions
    0

    Default Re: Change layout in code, but not on page

    Quote Originally Posted by stevesh View Post
    One of the things I like about being part of this forum is seeing all the different ways people want to use Zencart. But I can't imagine a reason you'd want to do that.
    Sorry, perhaps I should have given some background...

    There have been a couple of SEO people recently claiming that the first link on page A which points to page B has priority over any additional links which also are pointing to B.

    They say that after the first one, the subsequent ones don't pass anchor text.

    Now, I want my site to be designed for humans before Search Engines, so I have a clickable logo in the normal place, categories on the left with sensible titles. This is good for humans.

    Then, in the footer, I have a text link with keywords in it pointing to my main page, and I plan to put category links in with more descriptive (keyword heavy) links to tell the search engines what the category is about.

    This is pretty basic SEO/customer usability stuff. As an example, I have a carp fishing tackle site. Customers know that they are on a carp fishing site, so my categories simply say thinks like "Hooks" as "Carp fishing hooks" would be silly. The links at the bottom give info to the search engines telling them that the category is actually about "Carp fishing hooks" - a keyword I wish to rank for.

    The problem is that, if the first link priority theory is correct, google will see an image (no anchor text) for my main page, and the "human" category names. It will never see the more descriptive terms, or any other terms that I add in links in the main content of the page.

    The solution (I think) is to reorder the source. Reason being that search engines read the source, not the page output. So if the footer comes first in the source but css places it at the bottom of the page, the engines will read the good footer links and ignore the "Human" links.

    Having said that, while this first link priority does seem to be real, if it's going to take hours to fix it, I might as well leave my site as it it and spend the time getting more incoming links etc. Just trying to work out if I will get a lot of bang for my buck (timewise)...

  4. #4
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Change layout in code, but not on page

    You could change the code order by hacking /includes/templates/your_template/common/tpl_main_page.php (fairly straightforward), and probably get the visual order back with CSS, but that would be a lot of tricky work, only to be attempted if you are very good with CSS. You might need to add extra wrapper divs in various other files to give the right hooks for the CSS to work on. Cherry_zen and similar templates reorder the center/left/right column source, so that might be a good one to look at for ideas.

    Re the "no anchor text" logo, it automatically gets alt/title text in the link, so that shouldn't confuse the search engines.

  5. #5
    Join Date
    Dec 2006
    Posts
    107
    Plugin Contributions
    0

    Default Re: Change layout in code, but not on page

    Quote Originally Posted by gjh42 View Post
    You could change the code order by hacking /includes/templates/your_template/common/tpl_main_page.php (fairly straightforward), and probably get the visual order back with CSS, but that would be a lot of tricky work, only to be attempted if you are very good with CSS. You might need to add extra wrapper divs in various other files to give the right hooks for the CSS to work on. Cherry_zen and similar templates reorder the center/left/right column source, so that might be a good one to look at for ideas.
    Thanks for your help, I will take a look at the code of the mentioned templates. I'm not that good with CSS though so might not turn out too well!

    Re the "no anchor text" logo, it automatically gets alt/title text in the link, so that shouldn't confuse the search engines.
    That's debatable if you ask me. It used to work a few years back but I've seen a few people claim recently that it no longer passes anchor text. It might still count as on page content though. One to test I think...

  6. #6
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Change layout in code, but not on page

    If you're not fully confident about your CSS skill, I think it would be a bad idea for you to try this... unless you just want the learning experience. Do it on a local or other test site, not your public site.

    Bear in mind that search engines are built to get the most useful information for their users, and they know how websites are generally built. They know that the logo will usually be one of the first things on the page, an image and a home page link, so I don't think you have to try to trick them to get them to find useful content. If you want to tailor the logo alt text, you can do it I think just in a language file.

    If you are concerned about key terms for your categories, I think having those terms as the actual category names will be important, as the category name shows in a number of places throughout the site.

 

 

Similar Threads

  1. Replies: 2
    Last Post: 30 Jan 2015, 05:00 PM
  2. Coupon Code for some, but not all, new customers
    By daedylus in forum Discounts/Coupons, Gift Certificates, Newsletters, Ads
    Replies: 5
    Last Post: 9 Aug 2011, 04:46 AM
  3. tax rate change but do not change gross
    By tbrides in forum Currencies & Sales Taxes, VAT, GST, etc.
    Replies: 2
    Last Post: 13 Mar 2010, 10:38 AM
  4. Change Category Page Layout to New Products Layout
    By tonemap in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 22 Jan 2010, 11:30 PM
  5. Change background on help page but not main page?
    By adamson in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 12 Jan 2008, 07:29 AM

Bookmarks

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
Zen-Cart, Internet Selling Services, Klamath Falls, OR