Yii Framework Forum: [EXTENSION] phundament - Yii Framework Forum

Jump to content

  • (11 Pages)
  • +
  • « First
  • 6
  • 7
  • 8
  • 9
  • 10
  • Last »
  • You cannot start a new topic
  • You cannot reply to this topic

[EXTENSION] phundament Phundament 3: Yii CMS based upon independent modules and extensions Rate Topic: ***** 3 Votes

#141 User is offline   ametad 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 78
  • Joined: 08-February 12
  • Location:Holland

Posted 26 September 2012 - 03:22 AM

View Postschmunk, on 24 August 2012 - 07:54 AM, said:

Hi ametad, did you find a solution?


No not yet, I have been on holidays too. And when I came back Crisu83 changed the whole Bootstrap module of his. There had been a new version of Twitter Bootstrap then, the new module is build on that new version I suppose.

Do you use the new or the old crisu83.bootstrap in Phundament?

==============

I hope you can help me with the following question I have: can you make submenu-items within P3 Content Management functionality? I can make a sub-item in the Sitemap (P3MetaTree) but it doesn't appear in the BootNavbar structure. Is there a way to do this?


Best regards.
0

#142 User is offline   schmunk 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 569
  • Joined: 02-November 08
  • Location:Stuttgart, Germany

Posted 27 September 2012 - 04:32 AM

Sure, P3Page has a static metohd

P3Page::getMenuItems($rootNode)


So you should be able to create menu items with every menu node, although you'd have to wrap it into some code, like getting your first level nodes manually and then use the method above to get the submenu items.

I see, this needs improvement.
Could you open a ticket in p3pages?
Phundament - Yii Application Boilerplate with composer support
Fork on github

Follow phundament on Twitter

DevSystem: Mac OS X 10.7 - PHP 5.3 - Apache2 - Yii 1.1 / trunk - Firefox or Safari
0

#143 User is offline   ametad 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 78
  • Joined: 08-February 12
  • Location:Holland

Posted 27 September 2012 - 06:08 AM

Thanks. I have made a Ticket / Issue on Github. That is what you mean, right? Succes!
0

#144 User is offline   ametad 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 78
  • Joined: 08-February 12
  • Location:Holland

Posted 28 September 2012 - 03:07 AM

Hi Schmunk,

I see you have restructured the whole directory structure. Why did you do that? It is harder for me now to update an existing installation of P3..

Best regards,
Ametad
0

#145 User is offline   schmunk 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 569
  • Joined: 02-November 08
  • Location:Stuttgart, Germany

Posted 28 September 2012 - 12:19 PM

Hi Ametad,

I really find the new structure much more usable, but anyway, you should be able to use any directory structure - that's a feature of Phundament.

How do you do your updates? Do you update phundament/app itself or are composer updates the problem?
Composer should not be affected by this change, besides that you have to do some more imports now, but that's the only way to keep it totally flexible.

btw: you can find the classic structure in the yii-webapp branch, although I've moved everything to protected there, because of security issues.

But there could be even more branches, like different setups.


Best regards,
schmunk
Phundament - Yii Application Boilerplate with composer support
Fork on github

Follow phundament on Twitter

DevSystem: Mac OS X 10.7 - PHP 5.3 - Apache2 - Yii 1.1 / trunk - Firefox or Safari
0

#146 User is offline   ametad 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 78
  • Joined: 08-February 12
  • Location:Holland

Posted 02 October 2012 - 06:30 AM

Thank you for your message, you've got a personal message back from me.

In the interest of helping the community also, I ask some more questions here. Perhaps it helps others... The latest layout of P3 I really like! You have used the Bootstrap layout in the views, it looks very clean and nice.

The PageMeta model has a lot of properties and a few I don't understand the function of. Looking at p3pages/models/BaseP3PageMeta there are the following properties:

* Columns in table "p3_page_meta" available as properties of the model:
* @property integer $id - unique identification of record
* @property integer $status - DELETED(0), DRAFT(10), PENDING(20), ACTIVE(30), LOCKED(40), HIDDEN(50), ARCHIVE(60)
* @property string $type
* @property string $language - Language set for this page
* @property integer $treeParent_id - Parent page id
* @property integer $treePosition - Position of this page in the tree
* @property string $begin - display page from this date/time
* @property string $end - stop displaying page from this date/time
* @property string $keywords - meta data keywords
* @property string $customData
* @property integer $label
* @property string $owner - owner of this page
* @property string $checkAccessCreate
* @property string $checkAccessRead - who can read this page
* @property string $checkAccessUpdate - who can update this page
* @property string $checkAccessDelete - who can delete this page
* @property string $createdAt - when created
* @property string $createdBy - created by whom
* @property string $modifiedAt - when modified
* @property string $modifiedBy - modified by whom
* @property string $guid
* @property string $ancestor_guid
* @property string $model

Could you please explain what the purpose is, of these properties: $type, $customData, $label, $checkAccessCreate, $guid, $ancestor_guid, $model?

Greetings!
0

#147 User is offline   schmunk 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 569
  • Joined: 02-November 08
  • Location:Stuttgart, Germany

Posted 02 October 2012 - 12:25 PM

View Postametad, on 02 October 2012 - 06:30 AM, said:

Thank you for your message, you've got a personal message back from me.

In the interest of helping the community also, I ask some more questions here. Perhaps it helps others... The latest layout of P3 I really like! You have used the Bootstrap layout in the views, it looks very clean and nice.

Thanks. I splitted the themes in a public part (www/themes) where all the js- and css-files are.
And defined the viewPath in a protected directory.

View Postametad, on 02 October 2012 - 06:30 AM, said:

The PageMeta model has a lot of properties and a few I don't understand the function of. Looking at p3pages/models/BaseP3PageMeta there are the following properties:

The MetaData models store data, which is common for different models. The data is partially auto-generated with P3MetaData Behavior
And (tbd) there should be a widget which handles the meta-data.

View Postametad, on 02 October 2012 - 06:30 AM, said:

* @property string $type

tbd - Had that in Phundament 2; configurable type (app params)

....

View Postametad, on 02 October 2012 - 06:30 AM, said:

* @property string $customData

Idea from Prado - just custom data

View Postametad, on 02 October 2012 - 06:30 AM, said:

* @property integer $label

tbd: Idea from OS X - colorized label

View Postametad, on 02 October 2012 - 06:30 AM, said:

* @property string $checkAccessCreate

tbd: Role which is allowed to create child items

View Postametad, on 02 October 2012 - 06:30 AM, said:

* @property string $guid

http://en.wikipedia....ique_identifier

View Postametad, on 02 October 2012 - 06:30 AM, said:

* @property string $ancestor_guid

tbd: Record this record was copied from

View Postametad, on 02 October 2012 - 06:30 AM, said:

* @property string $model

Left-over from Phundament 2; if you want to use just one meta-data table, you need that field - it's redundant at the moment.

View Postametad, on 02 October 2012 - 06:30 AM, said:

Could you please explain what the purpose is, of these properties: $type, $customData, $label, $checkAccessCreate, $guid, $ancestor_guid, $model?
Greetings!



Best regards,
schmunk
Phundament - Yii Application Boilerplate with composer support
Fork on github

Follow phundament on Twitter

DevSystem: Mac OS X 10.7 - PHP 5.3 - Apache2 - Yii 1.1 / trunk - Firefox or Safari
0

#148 User is offline   ametad 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 78
  • Joined: 08-February 12
  • Location:Holland

Posted 03 October 2012 - 06:40 AM

Many thank you's.
0

#149 User is offline   ametad 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 78
  • Joined: 08-February 12
  • Location:Holland

Posted 03 October 2012 - 10:14 AM

What about the CKEditor templates? I am trying to locate the right file wich includes the templates for the editor. Isn't it the cktemplates.js file? In this somewhat older installation there I can find this file in these directories:
  • extensions/phundament/themes/p3bootstrap/ckeditor/cktemplates.js
  • themes/backend/ckeditor/cktemplates.js
  • themes/frontend/ckeditor/cktemplates.js


But whatever I do... it doesn't change the templates?! I also - in all cases - removed the /assets folder with cached files. What file has to be changed?

Greetings!
0

#150 User is offline   schmunk 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 569
  • Joined: 02-November 08
  • Location:Stuttgart, Germany

Posted 04 October 2012 - 09:18 AM

It should be the one in themes/frontend/ckeditor/cktemplates.js because you usually want to edit your contents with the frontend theme.

Could you check you final config settings here, in case you're still merging the configs ...
http://phundament.local/index.php/en/p3admin/default/settings

Search for 'templates_files' and for sure, remove the assets first ;)

[edit]
Or have a look at your generated source code, search also for 'templates_files'
Phundament - Yii Application Boilerplate with composer support
Fork on github

Follow phundament on Twitter

DevSystem: Mac OS X 10.7 - PHP 5.3 - Apache2 - Yii 1.1 / trunk - Firefox or Safari
0

#151 User is offline   schmunk 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 569
  • Joined: 02-November 08
  • Location:Stuttgart, Germany

Posted 05 October 2012 - 10:08 AM

Questions from ametad, I would like to share here...

Quote

I thought that I could do a 'composer.phar update' to let it download all latest versions of the included repos (from Github and/or Bitbucket or where ever). But how does this work if the directory structure is changed all of a sudden? Or is this not a problem? What do you mean with an import, is that the download of a particular repo?


No, shouldn't be a problem. The new structure only affects new P3 installations - in theory :)

You shouldn't clone the repo for a new project - download a tagged version, they contain "stable" releases.
At least don't git pull from phundament/app.git.
This repo does only contain the config files for Yii and composer, if you change those you're very likely to run into problems.
It makes sense to just update the config/ComposerCallback.php file and adjust your composer.json scripts, but don't change vendor-dir.
But, even if you'd do so - you would only download the new files.

For the packages you may have to adjust some aliases and import though. That's because I removed paths like 'ext.crisu83.yii-bootstrap.widgtes.TbMenu' with 'TbMenu', otherwise you'd be able to change the vendor-dir location.
But you can stick to 0.6.* versions of p3widgets, p3pages, .... but that's just a minor thing - require them in comopser.json and run comopser.phar update.


Best regards,
schmunk

PS: But cloning the repo would the right way to update P3 with the yii-user changes you mentioned ;) I think it would be just an update of composer.json - I should do that on packages.phundament.com - and config/console.php as the migrations would now be taken from the module, I have this one somewhere as a todo.
Phundament - Yii Application Boilerplate with composer support
Fork on github

Follow phundament on Twitter

DevSystem: Mac OS X 10.7 - PHP 5.3 - Apache2 - Yii 1.1 / trunk - Firefox or Safari
0

#152 User is offline   ametad 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 78
  • Joined: 08-February 12
  • Location:Holland

Posted 10 October 2012 - 03:59 AM

View Postschmunk, on 04 October 2012 - 09:18 AM, said:

It should be the one in themes/frontend/ckeditor/cktemplates.js because you usually want to edit your contents with the frontend theme.

Could you check you final config settings here, in case you're still merging the configs ...
http://phundament.local/index.php/en/p3admin/default/settings

Search for 'templates_files' and for sure, remove the assets first ;)

[edit]
Or have a look at your generated source code, search also for 'templates_files'


Thanks, found it! I searched the generated code and there it stated the location. One thing I had not done was clearing the cache of the browser. After 1) editing the cktemplates.js file in the theme folder, 2) clearing the Yii cache and 3) clearing the browser cache it worked like a charm.
1

#153 User is offline   ametad 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 78
  • Joined: 08-February 12
  • Location:Holland

Posted 10 October 2012 - 09:23 AM

Hi Tobias,

Your previous post about the update of Phundament I am still processing. But it is helpful already.

Another thing I came across is an conflict between certain Javascripts, one from the UserModule and one from the P3WidgetsModule. You can see what the problem is when you make a new ProfileField in the UserModule. Try to do this with an user-account with only enough rights to access the UserModule controller actions (NOT with access to the P3WidgetsModule controller actions).

When you choose a FieldType, certain params get an pre-defined value. Choosing VARCHAR sets the FieldSize to 255 e.g. and FieldType INTEGER gets a FieldSize of 10.

In the ProfileFieldController the public function registerScript() has the following JS which handles mentioned behaviour:

$js = "

	var name = $('#name'),
	value = $('#value'),
	allFields = $([]).add(name).add(value),
	tips = $('.validateTips');
	
	var listWidgets = jQuery.parseJSON('".str_replace("'","\'",CJavaScript::jsonEncode($widgets[0]))."');
	var widgets = jQuery.parseJSON('".str_replace("'","\'",CJavaScript::jsonEncode($widgets[1]))."');
	var wgByType = jQuery.parseJSON('".str_replace("'","\'",CJavaScript::jsonEncode($wgByTypes))."');
	
	var fieldType = {
			'INTEGER':{
				'hide':['match','other_validator','widgetparams'],
				'val':{
					'field_size':10,
					'default':'0',
					'range':'',
					'widgetparams':''
				}
			},
			'VARCHAR':{
				'hide':['widgetparams'],
				'val':{
					'field_size':255,
					'default':'',
					'range':'',
					'widgetparams':''
				}
			},
			'TEXT':{
				'hide':['range','widgetparams'],
				'val':{
					'field_size':1000,
					'default':'',
					'range':'',
					'widgetparams':''
				}
			},
			'DATE':{
				'hide':['field_size','field_size_min','match','range','widgetparams'],
				'val':{
					'field_size':0,
					'default':'0000-00-00',
					'range':'',
					'widgetparams':''
				}
			},
			'FLOAT':{
				'hide':['match','other_validator','widgetparams'],
				'val':{
					'field_size':'10.2',
					'default':'0.00',
					'range':'',
					'widgetparams':''
				}
			},
			'DECIMAL':{
				'hide':['match','other_validator','widgetparams'],
				'val':{
					'field_size':'10,2',
					'default':'0',
					'range':'',
					'widgetparams':''
				}
			},
			'BOOL':{
				'hide':['field_size','field_size_min','match','widgetparams'],
				'val':{
					'field_size':0,
					'default':0,
					'range':'1==".UserModule::t('Yes').";0==".UserModule::t('No')."',
					'widgetparams':''
				}
			},
			'BLOB':{
				'hide':['field_size','field_size_min','match','widgetparams'],
				'val':{
					'field_size':0,
					'default':'',
					'range':'',
					'widgetparams':''
				}
			},
			'BINARY':{
				'hide':['field_size','field_size_min','match','widgetparams'],
				'val':{
					'field_size':0,
					'default':'',
					'range':'',
					'widgetparams':''
				}
			}
		};
			
	function showWidgetList(type) {
		$('div.uwidget select').empty();
		$('div.uwidget select').append('<option value=\"\">".UserModule::t('No')."</option>');
		if (wgByType[type]) {
			for (var k in wgByType[type]) {
				$('div.uwidget select').append('<option value=\"'+wgByType[type][k]+'\">'+widgets[wgByType[type][k]]['label']+'</option>');
			}
		}
	}
		
	function setFields(type) {
		if (fieldType[type]) {
			if (".((isset($_GET['id']))?0:1).") {
				showWidgetList(type);
				$('#widgetlist option:first').attr('selected', 'selected');
			}
			
			$('div.formrow').addClass('toshow').removeClass('tohide');
			if (fieldType[type].hide.length) $('div.'+fieldType[type].hide.join(', div.')).addClass('tohide').removeClass('toshow');
			if ($('div.uwidget select').val()) {
				$('div.widgetparams').removeClass('tohide');
			}
			$('div.toshow').show(500);
			$('div.tohide').hide(500);
			".((!isset($_GET['id']))?"
			for (var k in fieldType[type].val) { 
				$('div.'+k+' input').val(fieldType[type].val[k]);
			}":'')."
		}
	}
	
	function isArray(obj) {
		if (obj.constructor.toString().indexOf('Array') == -1)
			return false;
		else
			return true;
	}
		
	$('#dialog-form').dialog({
		autoOpen: false,
		height: 400,
		width: 400,
		modal: true,
		buttons: {
			'".UserModule::t('Save')."': function() {
				var wparam = {};
				var fparam = {};
				$('#dialog-form fieldset .wparam').each(function(){
					if ($(this).val()) wparam[$(this).attr('name')] = $(this).val();
				});
				
				var tab = $('#tabs ul li.ui-tabs-selected').text();
				fparam[tab] = {};
				$('#dialog-form fieldset .tab-'+tab).each(function(){
					if ($(this).val()) fparam[tab][$(this).attr('name')] = $(this).val();
				});
				
				if ($.JSON.encode(wparam)!='{}') $('div.widgetparams input').val($.JSON.encode(wparam));
				if ($.JSON.encode(fparam[tab])!='{}') $('div.other_validator input').val($.JSON.encode(fparam)); 
				
				$(this).dialog('close');
			},
			'".UserModule::t('Cancel')."': function() {
				$(this).dialog('close');
			}
		},
		close: function() {
		}
	});


	$('#widgetparams').focus(function() {
		var widget = widgets[$('#widgetlist').val()];
		var html = '';
		var wparam = ($('div.widgetparams input').val())?$.JSON.decode($('div.widgetparams input').val()):{};
		var fparam = ($('div.other_validator input').val())?$.JSON.decode($('div.other_validator input').val()):{};
		
		// Class params
		for (var k in widget.params) {
			html += '<label for=\"name\">'+((widget.paramsLabels[k])?widget.paramsLabels[k]:k)+'</label>';
			html += '<input type=\"text\" name=\"'+k+'\" id=\"widget_'+k+'\" class=\"text wparam ui-widget-content ui-corner-all\" value=\"'+((wparam[k])?wparam[k]:widget.params[k])+'\" />';
		}
		// Validator params		
		if (widget.other_validator) {
			var tabs = '';
			var li = '';
			for (var t in widget.other_validator) {
				tabs += '<div id=\"tab-'+t+'\" class=\"tab\">';
				li += '<li'+((fparam[t])?' class=\"ui-tabs-selected\"':'')+'><a href=\"#tab-'+t+'\">'+t+'</a></li>';
				
				for (var k in widget.other_validator[t]) {
					tabs += '<label for=\"name\">'+((widget.paramsLabels[k])?widget.paramsLabels[k]:k)+'</label>';
					if (isArray(widget.other_validator[t][k])) {
						tabs += '<select type=\"text\" name=\"'+k+'\" id=\"filter_'+k+'\" class=\"text fparam ui-widget-content ui-corner-all tab-'+t+'\">';
						for (var i in widget.other_validator[t][k]) {
							tabs += '<option value=\"'+widget.other_validator[t][k][i]+'\"'+((fparam[t]&&fparam[t][k])?' selected=\"selected\"':'')+'>'+widget.other_validator[t][k][i]+'</option>';
						}
						tabs += '</select>';
					} else {
						tabs += '<input type=\"text\" name=\"'+k+'\" id=\"filter_'+k+'\" class=\"text fparam ui-widget-content ui-corner-all tab-'+t+'\" value=\"'+((fparam[t]&&fparam[t][k])?fparam[t][k]:widget.other_validator[t][k])+'\" />';
					}
				}
				tabs += '</div>';
			}
			html += '<div id=\"tabs\"><ul>'+li+'</ul>'+tabs+'</div>';
		}
		
		$('#dialog-form fieldset').html(html);
		
		$('#tabs').tabs();
		
		// Show form
		$('#dialog-form').dialog('open');
	});
	
	$('#ufield_type').change(function() {
		setFields($(this).val());
	});
	
	$('#widgetlist').change(function() {
		if ($(this).val()) {
			$('div.widgetparams').show(500);
		} else {
			$('div.widgetparams').hide(500);
		}
		
	});
	
	// show all function 
	$('div.formrow p.note').append('<br/><a href=\"#\" id=\"showAll\">".UserModule::t('Show all')."</a>');
 	$('#showAll').click(function(){
		$('div.row').show(500);
		return false;
	});
	
	// init
	setFields($('#ufield_type').val());
	
	";


The problem occurs when the account has the rights to edit a P3 Widget (Translation) also. Another JavaScript handles the display of the buttons that appear when you hover over a P3Widget. Those buttons give access to edit the content etc.

I have not much knowledge of JS yet, so I don't see why those two scripts don't work together. But I notice that the pre-defined values for all kind of params of the ProfilField are not set automatically any-more.

Someone who sees the problem? Please enlighten us :)

Greetings,
Ametad
0

#154 User is offline   schmunk 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 569
  • Joined: 02-November 08
  • Location:Stuttgart, Germany

Posted 10 October 2012 - 11:51 AM

Huh, I get this error when trying to edit a Profile Field?!

CException
The asset "/var/www/phundament-app/modules/user/views/asset" to be published does not exist.


Didn't you mention, that you're using another version of yii-user?
I think a fix like http://www.yiiframew...dent-extensions should be included, or is it already fixed?


Best regards,
schmunk
Phundament - Yii Application Boilerplate with composer support
Fork on github

Follow phundament on Twitter

DevSystem: Mac OS X 10.7 - PHP 5.3 - Apache2 - Yii 1.1 / trunk - Firefox or Safari
0

#155 User is offline   ametad 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 78
  • Joined: 08-February 12
  • Location:Holland

Posted 10 October 2012 - 02:10 PM

You're right about me using another version of yii-user, it is a modified version. But the Javascript has been the same all along.

The error you get is because the module is written to reside in the /protected/modules directory. It is hardcoded in ProfileFieldController:
	public function registerScript() {
$basePath=Yii::getPathOfAlias('application.modules.user.views.asset');
...

Solution can be to change all lines like that to:
$basePath=Yii::getPathOfAlias('user.views.asset');

I think because in P3 you have set Aliases in the main config file, the path can begin with simply 'user.*'.

Aliases in main config:
'aliases' => array(
        'p3widgets' => 'ext.phundament.p3widgets',
        'p3media' => 'ext.phundament.p3media',
        'p3pages' => 'ext.phundament.p3pages',
        'user' => 'ext.mishamx.yii-user',
        'rights' => 'ext.crisu83.yii-rights',
    ),

0

#156 User is offline   ametad 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 78
  • Joined: 08-February 12
  • Location:Holland

Posted 10 October 2012 - 02:14 PM

PS. The files with the hard coded path to where the yii-user module is expected are:
  • UWjuiAutoComplete.php
  • UWjuidate.php
  • ProfileFieldController.php

0

#157 User is offline   ametad 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 78
  • Joined: 08-February 12
  • Location:Holland

Posted 10 October 2012 - 02:25 PM

This brings me to a conclusion that could work.. Because the yii-user module of Mishamx is hardly updated/-graded you could fork it and distribute it for a P3 installation. Then change the paths once to be more flexible. I think a module should be written to be as flexible as possible so it can be placed wherever you like. Some people will place it in the extension folder, or in the modules folder, or as you do now in a folder called 'vendor'.
Perhaps it is best to send in a pull request of yii-user to mishamx with some little changes that make the module more flexible.
0

#158 User is offline   schmunk 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 569
  • Joined: 02-November 08
  • Location:Stuttgart, Germany

Posted 15 October 2012 - 12:56 PM

Would be the best option I think, although it's not a big deal, I haven't found the time to do this, yet :(
Phundament - Yii Application Boilerplate with composer support
Fork on github

Follow phundament on Twitter

DevSystem: Mac OS X 10.7 - PHP 5.3 - Apache2 - Yii 1.1 / trunk - Firefox or Safari
0

#159 User is offline   ametad 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 78
  • Joined: 08-February 12
  • Location:Holland

Posted 16 October 2012 - 07:41 AM

View Postschmunk, on 15 October 2012 - 12:56 PM, said:

Would be the best option I think, although it's not a big deal, I haven't found the time to do this, yet :(

It is not that big a deal indeed.. And people can read about the solution right here ;)

Another question.. about description and keywords. Those can be set at the page translation (p3pages/p3PageTranslation/update) page. But how do I render those in a view or layout?
0

#160 User is offline   schmunk 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 569
  • Joined: 02-November 08
  • Location:Stuttgart, Germany

Posted 16 October 2012 - 08:58 AM

Untested, but somehow like this :)
<meta 
  name="keywords" 
  content="<?php (P3Page::getActivePage() !== null) ? P3Page::getActivePage()->metaData->keywords : 'My, default, keywords' ?>"
>

Phundament - Yii Application Boilerplate with composer support
Fork on github

Follow phundament on Twitter

DevSystem: Mac OS X 10.7 - PHP 5.3 - Apache2 - Yii 1.1 / trunk - Firefox or Safari
0

Share this topic:


  • (11 Pages)
  • +
  • « First
  • 6
  • 7
  • 8
  • 9
  • 10
  • Last »
  • 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