Jump to content

[Resolved] <H1></H1> help needed


Millie Moore

Recommended Posts

well I attempted to do this <H1></H1> tag just like I did for another page.  It worked for the other page but it didn't work on my contact-us.php page.  I put both tags in shop/skins/mican/templates/main.php file.  Here is what I have:

 

{if $smarty.server.REQUEST_URI|stristr:'contact-us.php'}
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Contact Form</title>
<H1>Contact Information and Form</H1>
</head>
</html>
{/if}
 

Can someone tell me what I did wrong and how to fix it?

thanks

 

Link to comment
Share on other sites

I tried that and it still didn't show up:

 

{if $smarty.server.REQUEST_URI|stristr:'contact-us.php'}
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Contact Form</title>
</head>
<body>
<H1>Contact Information and Form</H1>
</body>
</html>
{/if}

 

am I still doing something wrong?

 

Link to comment
Share on other sites

Let's examine the test.

{if $smarty.server.REQUEST_URI|stristr:'contact-us.php'}

Generally, we testing for a result that is true-ish. That is, no explicit comparison. There is a danger to assuming this, however.

$smarty is a valid variable name. And server is a good element name. And REQUEST_URI seems to be valid.

So that leaves the value of $smarty.server.REQUEST_URI to be examined. Let's just assume it is "/store/contact-us.html".
CubeCart 6 has friendly URLs that end in .html, not .php. So, test for that. Or, test for just "contact-us".

The REQUEST_URI will return a leading slash followed by the path/document, so using stristr() to find 'contact-us.html ' should return something.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...