Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

Page Title in 4.2

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #11  
Old 05-31-2009, 12:57 PM
 
HyPeR-X HyPeR-X is offline
 

Newbie
  
Join Date: May 2009
Posts: 4
 

Default 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.
__________________
X-Cart Gold V4.2
Reply With Quote
  #12  
Old 05-31-2009, 01:09 PM
  cflsystems's Avatar 
cflsystems cflsystems is offline
 

Veteran
  
Join Date: Apr 2007
Posts: 14,197
 

Default 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?
__________________
Steve Stoyanov
CFLSystems.com
Web Development
Reply With Quote

The following user thanks cflsystems for this useful post:
HyPeR-X (05-31-2009)
  #13  
Old 05-31-2009, 01:31 PM
 
HyPeR-X HyPeR-X is offline
 

Newbie
  
Join Date: May 2009
Posts: 4
 

Default 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
__________________
X-Cart Gold V4.2
Reply With Quote
  #14  
Old 05-31-2009, 02:05 PM
  cflsystems's Avatar 
cflsystems cflsystems is offline
 

Veteran
  
Join Date: Apr 2007
Posts: 14,197
 

Default Re: Page Title in 4.2

Glad you got it working
__________________
Steve Stoyanov
CFLSystems.com
Web Development
Reply With Quote
  #15  
Old 08-21-2009, 10:35 PM
 
Learner Learner is offline
 

X-Adept
  
Join Date: Dec 2008
Posts: 807
 

Default Re: Page Title in 4.2

Anyone for 4.1.9. ?Any help !!!

Thanks to all.
__________________
4.6.1 Platinum


Reply With Quote
  #16  
Old 08-22-2009, 06:46 AM
  cflsystems's Avatar 
cflsystems cflsystems is offline
 

Veteran
  
Join Date: Apr 2007
Posts: 14,197
 

Default 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...
__________________
Steve Stoyanov
CFLSystems.com
Web Development
Reply With Quote
  #17  
Old 08-23-2009, 12:13 AM
  ADDISON's Avatar 
ADDISON ADDISON is offline
 

X-Man
  
Join Date: Jan 2008
Posts: 2,613
 

Default Re: Page Title in 4.2

I am testing 4.3 beta and QT added some idea from you Steve. Good job anyway!
__________________
X-Cart Next: Business 5.2 (learning and testing)
X-Cart Classic: Gold and Gold Plus 4.7
Lots of Modules and Customizations
OS in use: Red Hat Enterprise, Fedora, CentOS, Debian, Ubuntu, Linux Mint, Kali Linux
Ideas for Server configuration (basicaly): Nginx/Pound (reverse proxy), Apache/Nginx (webserver), Squid/Varnish (cache server), HHVM or (PHP-FPM + PHP 5.6 + opcache), MariaDB/Percona MySQL Server, Redis (storing sessions)

You can catch my ideas here: http://ideas.x-cart.com
Reply With Quote
  #18  
Old 08-23-2009, 05:56 AM
  cflsystems's Avatar 
cflsystems cflsystems is offline
 

Veteran
  
Join Date: Apr 2007
Posts: 14,197
 

Default 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
__________________
Steve Stoyanov
CFLSystems.com
Web Development
Reply With Quote
  #19  
Old 09-04-2009, 09:39 AM
 
dwpers dwpers is offline
 

Senior Member
  
Join Date: Aug 2009
Location: Washington D.C.
Posts: 136
 

Default 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.
__________________
X-Cart Pro 4.2.2
Reply With Quote
  #20  
Old 09-27-2009, 06:41 PM
 
digiemp digiemp is offline
 

Senior Member
  
Join Date: Aug 2007
Posts: 192
 

Default 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?
__________________
version 4.4.2
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


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

   

 
X-Cart forums © 2001-2020