X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   Page Title in 4.2 (https://forum.x-cart.com/showthread.php?t=46663)

HyPeR-X 05-31-2009 12:57 PM

Re: Page Title in 4.2
 
Quote:

Originally Posted by cflsystems
What kind of errors?


When editing product:

Quote:

Please make sure you have filled in properly all required fields!

When editing static page:

Quote:

Please fill in all the required fields.

I also noticed that when updating category it says its updated, but the page title doesn't show on customer pages nor when editing the category in admin panel.

cflsystems 05-31-2009 01:09 PM

Re: Page Title in 4.2
 
Non of this happens for me. Actually after your message I did all of this on my test site and got no errors. Everything works. Do you have any other modifications that might cause this? Are you sure you didn't make errors when making changes to php files?

HyPeR-X 05-31-2009 01:31 PM

Re: Page Title in 4.2
 
Quote:

Originally Posted by cflsystems
Non of this happens for me. Actually after your message I did all of this on my test site and got no errors. Everything works. Do you have any other modifications that might cause this? Are you sure you didn't make errors when making changes to php files?


I got it to work, instead of pasting it after:


<tr>
<td height="10" class="FormButton" nowrap="nowrap" valign="top">{$lng.lbl_page_name}:</td>
<td><font class="Star">*</font></td>
<td><input type="text" name="pagetitle" value="{$page_data.title|default:"$default_page_ti tle"}" size="45" {if $config.SEO.clean_urls_enabled eq "Y"}onchange="javascript: if (this.form.clean_url.value == '') copy_clean_url(this, this.form.clean_url)"{/if} /></td>
</tr>


I removed the above and pasted the new code, ofcourse x-cart cant read the names etc. then.

My fault, sorry! Thanks for the mod, works fine now :)

cflsystems 05-31-2009 02:05 PM

Re: Page Title in 4.2
 
Glad you got it working

Learner 08-21-2009 10:35 PM

Re: Page Title in 4.2
 
Anyone for 4.1.9. ?Any help !!!

Thanks to all.

cflsystems 08-22-2009 06:46 AM

Re: Page Title in 4.2
 
I am afraid you either have to pay someone to try fit this mod in 4.1.9 or go with commercial mod which will probably cost the same so...

ADDISON 08-23-2009 12:13 AM

Re: Page Title in 4.2
 
I am testing 4.3 beta and QT added some idea from you Steve. Good job anyway!

cflsystems 08-23-2009 05:56 AM

Re: Page Title in 4.2
 
I knew they will have to add this feature but to actually borrow this code wow means I am on the right track. Maybe xcart should have "credits" section in admin to put all names of ppl which code, ideas or beta testing they used :)

dwpers 09-04-2009 09:39 AM

Re: Page Title in 4.2
 
Here is another possible solution:

Passing variable title to header template

When the majority of your templates use the same headers and footers, it is common to split those out into their own templates and {include} them. But what if the header needs to have a different title, depending on what page you are coming from? You can pass the title to the header as an attribute when it is included.

Passing the title variable to the header template
mainpage.tpl - When the main page is drawn, the title of ⌠Main Page■ is passed to the header.tpl, and will subsequently be used as the title.

Code:

{include file='header.tpl' title='Main Page'}
{* template body goes here *}
{include file='footer.tpl'}


archives.tpl - When the archives page is drawn, the title will be ⌠Archives■. Notice in the archive example, we are using a variable from the archives_page.conf file instead of a hard coded variable.

Code:

{config_load file='archive_page.conf'}
{include file='header.tpl' title=#archivePageTitle#}
{* template body goes here *}
{include file='footer.tpl'}


header.tpl - Notice that ⌠Smarty News■ is printed if the $title variable is not set, using the default variable modifier.

Code:

<html>
<head>
<title>{$title|default:'Smarty News'}</title>
</head>
<body>
footer.tpl
</body>
</html>



This is all information that can be found in the Smarty docs.

digiemp 09-27-2009 06:41 PM

Re: Page Title in 4.2
 
I get the following error when trying to modify any category:

Parse error
: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting ')' in /home/*edit*/public_html/*edit*.com/admin/category_modify.php on line 199

Here's what the file in question looks like, starting at line 189:

Code:

# Update general data of category
        #
        $data = array(
            "category" => $category_name,
            "description" => $description,
            "meta_description" => $meta_description,
            "meta_keywords" => $meta_keywords,
            "avail" => $avail,
            "order_by" => $order_by,
            "override_child_meta" => $override_child_meta
            "category_page_title" => $category_page_title
            );
        func_array2update("categories", $data, "categoryid = '$cat'");
        func_membership_update("category", $cat, $membershipids);

        if ($config['SEO']['clean_urls_enabled'] == 'N') {


Line 199 is the added
Code:

"category_page_title" => $category_page_title

Any suggestions?


All times are GMT -8. The time now is 05:13 PM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.