Yii Framework Forum: SeoUrlManager extension - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

SeoUrlManager extension Rules for SeoURLManager extension Rate Topic: ***** 1 Votes

#1 User is offline   VINAY Kr. SHARMA 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 151
  • Joined: 13-September 11
  • Location:Gurgaon

Posted 07 October 2011 - 06:57 AM

Hi! All,

I'm using seoUrlManager. But facing some problems like much more rules declarations as below I've pasted my example code rules. Please help me about how can I reduce rules without effecting existing/running pages.

'urlManager' => array(
	'class' => 'ext.seoUrlManager.components.ExtSeoUrlManager',
	'cacheID' => 'cache',
	'rules' => array(
    	'' => 'site/index',
    	'/about-us' => 'site/page/view/about-us',
    	'/contact-us' => 'site/contact',
    	'/site-map' => 'site/page/view/site-map',

    	'/solutions' => 'solutions/index',

    	'/solutions/organizational-excellence' => 'solutions/page/view/organizational-excellence',
    	'/solutions/organizational-excellence/leading-people-through-change' => 'solutions/page/view/organizational-excellence',
    	'/solutions/organizational-excellence/legendary-service' => 'solutions/page/view/organizational-excellence/legendary-service',
    	'/solutions/organizational-excellence/culture-change' => 'solutions/page/view/organizational-excellence/culture-change',
    	'/solutions/organizational-excellence/creating-your-organizations-future' => 'solutions/page/view/organizational-excellence/creating-your-organizations-future',

    	'/solutions/team-leadership' => 'solutions/page/view/team-leadership',
    	'/solutions/team-leadership/situational-team-leadership' => 'solutions/page/view/team-leadership/situational-team-leadership',
    	'/solutions/team-leadership/team-work' => 'solutions/page/view/team-leadership/team-work',
    	'/solutions/team-leadership/team-chartering' => 'solutions/page/view/team-leadership/team-chartering',
    	'/solutions/team-leadership/teaming-virtually' => 'solutions/page/view/team-leadership/teaming-virtually',

    	'/solutions/one-to-one-talent-management' => 'solutions/page/view/one-to-one-talent-management/',
    	'/solutions/one-to-one-talent-management/situational-leadership-2' => 'solutions/page/view/one-to-one-talent-management/situational-leadership-2',
    	'/solutions/one-to-one-talent-management/situational-leadership-2-blended' => 'solutions/page/view/one-to-one-talent-management/situational-leadership-2-blended',
    	'/solutions/one-to-one-talent-management/situational-leadership-2-for-sales-leaders' => 'solutions/page/view/one-to-one-talent-management/situational-leadership-2-for-sales-leaders',
    	'/solutions/one-to-one-talent-management/situational-front-line-leadership' => 'solutions/page/view/one-to-one-talent-management/situational-front-line-leadership',
    	'/solutions/one-to-one-talent-management/leading-virtually' => 'solutions/page/view/one-to-one-talent-management/leading-virtually',
    	'/solutions/one-to-one-talent-management/coaching-essentials-for-leaders' => 'solutions/page/view/one-to-one-talent-management/coaching-essentials-for-leaders',
    	'/solutions/one-to-one-talent-management/whale-done-the-power-of-positive-relationships' => 'solutions/page/view/one-to-one-talent-management/whale-done-the-power-of-positive-relationships',
    	'/solutions/one-to-one-talent-management/core-leadership-skills'=>'solutions/page/view/one-to-one-talent-management/core-leadership-skills',
   	 
    	'<controller:\w+>' => '/<controller>',
    	'<controller:\w+>/<id:\d+>' => '<controller>/view',
    	'<controller:\w+>/<action:\w+>' => '<controller>/<action>',
    	'<controller:\w+>/<action:\w+>/<id:\d+>' => '<controller>/<action>',
    	'/gii' => 'gii',
    	'/gii/<controller:\w+>' => 'gii/<controller>',
    	'/gii/<controller:\w+>/<action:\w+>' => 'gii/<controller>/<action>',
    	'/site/captcha' => '/site/captcha',
	),
	'wwwMode' => 'strip',
	'showScriptName' => false,
),

VINAY Kr. SHARMA
@vinaykrsharma
Facebook ID: vinaykrsharma
Blog

Co-operation comes from friendship, friendship comes from trust, and trust comes from kind-heartedness.
0

#2 User is offline   limitless 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 120
  • Joined: 22-July 11

Posted 20 May 2012 - 06:46 AM

hey, see this guide entry for more details how to accomplish this: http://www.yiiframew...terizing-routes

just as an example to one of your rules, most of your rules can in fact be written this way:

'/solutions/organizational-excellence/legendary-service' => 'solutions/page/view/organizational-excellence/legendary-service',
------> '/solutions/<a1>/<a2>' => 'solutions/page/view/<a1>/<a2>',

View PostVINAY Kr SHARMA, on 07 October 2011 - 06:57 AM, said:

Hi! All,

I'm using seoUrlManager. But facing some problems like much more rules declarations as below I've pasted my example code rules. Please help me about how can I reduce rules without effecting existing/running pages.

'urlManager' => array(
	'class' => 'ext.seoUrlManager.components.ExtSeoUrlManager',
	'cacheID' => 'cache',
	'rules' => array(
    	'' => 'site/index',
    	'/about-us' => 'site/page/view/about-us',
    	'/contact-us' => 'site/contact',
    	'/site-map' => 'site/page/view/site-map',

    	'/solutions' => 'solutions/index',

    	'/solutions/organizational-excellence' => 'solutions/page/view/organizational-excellence',
    	'/solutions/organizational-excellence/leading-people-through-change' => 'solutions/page/view/organizational-excellence',
    	'/solutions/organizational-excellence/legendary-service' => 'solutions/page/view/organizational-excellence/legendary-service',
    	'/solutions/organizational-excellence/culture-change' => 'solutions/page/view/organizational-excellence/culture-change',
    	'/solutions/organizational-excellence/creating-your-organizations-future' => 'solutions/page/view/organizational-excellence/creating-your-organizations-future',

    	'/solutions/team-leadership' => 'solutions/page/view/team-leadership',
    	'/solutions/team-leadership/situational-team-leadership' => 'solutions/page/view/team-leadership/situational-team-leadership',
    	'/solutions/team-leadership/team-work' => 'solutions/page/view/team-leadership/team-work',
    	'/solutions/team-leadership/team-chartering' => 'solutions/page/view/team-leadership/team-chartering',
    	'/solutions/team-leadership/teaming-virtually' => 'solutions/page/view/team-leadership/teaming-virtually',

    	'/solutions/one-to-one-talent-management' => 'solutions/page/view/one-to-one-talent-management/',
    	'/solutions/one-to-one-talent-management/situational-leadership-2' => 'solutions/page/view/one-to-one-talent-management/situational-leadership-2',
    	'/solutions/one-to-one-talent-management/situational-leadership-2-blended' => 'solutions/page/view/one-to-one-talent-management/situational-leadership-2-blended',
    	'/solutions/one-to-one-talent-management/situational-leadership-2-for-sales-leaders' => 'solutions/page/view/one-to-one-talent-management/situational-leadership-2-for-sales-leaders',
    	'/solutions/one-to-one-talent-management/situational-front-line-leadership' => 'solutions/page/view/one-to-one-talent-management/situational-front-line-leadership',
    	'/solutions/one-to-one-talent-management/leading-virtually' => 'solutions/page/view/one-to-one-talent-management/leading-virtually',
    	'/solutions/one-to-one-talent-management/coaching-essentials-for-leaders' => 'solutions/page/view/one-to-one-talent-management/coaching-essentials-for-leaders',
    	'/solutions/one-to-one-talent-management/whale-done-the-power-of-positive-relationships' => 'solutions/page/view/one-to-one-talent-management/whale-done-the-power-of-positive-relationships',
    	'/solutions/one-to-one-talent-management/core-leadership-skills'=>'solutions/page/view/one-to-one-talent-management/core-leadership-skills',
        
    	'<controller:\w+>' => '/<controller>',
    	'<controller:\w+>/<id:\d+>' => '<controller>/view',
    	'<controller:\w+>/<action:\w+>' => '<controller>/<action>',
    	'<controller:\w+>/<action:\w+>/<id:\d+>' => '<controller>/<action>',
    	'/gii' => 'gii',
    	'/gii/<controller:\w+>' => 'gii/<controller>',
    	'/gii/<controller:\w+>/<action:\w+>' => 'gii/<controller>/<action>',
    	'/site/captcha' => '/site/captcha',
	),
	'wwwMode' => 'strip',
	'showScriptName' => false,
),


0

#3 User is offline   Maurizio Domba Cerin 

  • Yii - Yesss It Is !!!
  • Yii
  • Group: Yii Dev Team
  • Posts: 4,338
  • Joined: 12-October 09
  • Location:Croatia

Posted 20 May 2012 - 01:22 PM

NOTE: Moved to proper section (Extensions instead of General Discussion for Yii 1.1.x)
Find more about me.... btw. Do you know your WAN IP?
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users