Joomla! Discussion Forums



It is currently Wed Nov 25, 2009 9:40 pm (All times are UTC )

 




Post new topic Reply to topic  [ 3 posts ] 
Author Message
Posted: Thu Feb 21, 2008 1:47 pm 
Joomla! Intern
Joomla! Intern
Offline

Joined: Sun May 07, 2006 5:04 pm
Posts: 64
Location: France
with the standard 1.5.1 release
when displaying an article (com_content/view/article/view_html.php)

with
$params =& $mainframe->getParams('com_content');
or $params =& JComponentHelper::getParams('com_content');
that must have the same effect !

I get that :
print_r($params);


JParameter Object ( [_raw] => show_noauth=0 show_title=1 link_titles=0 show_intro=1 show_section=0 link_section=0 show_category=0 link_category=0 show_author=1 show_create_date=1 show_modify_date=1 show_item_navigation=0 show_readmore=1 show_vote=0 show_icons=1 show_pdf_icon=1 show_print_icon=1 show_email_icon=1 show_hits=1 feed_summary=0 [_xml] => [_elements] => Array ( ) [_elementPath] => Array ( [0] => X:\usr2\dev\joomla_150\libraries\joomla\html\parameter\element ) [_defaultNameSpace] => _default [_registry] => Array ( [_default] => Array ( [data] => stdClass Object ( [show_noauth] => 0 [show_title] => 1 [link_titles] => 0 [show_intro] => 1 [show_section] => 0 [link_section] => 0 [show_category] => 0 [link_category] => 0 [show_author] => 1 [show_create_date] => 1 [show_modify_date] => 1 [show_item_navigation] => 0 [show_readmore] => 1 [show_vote] => 0 [show_icons] => 1 [show_pdf_icon] => 0 [show_print_icon] => 0 [show_email_icon] => 0 [show_hits] => 1 [feed_summary] => 0 [show_description] => 0 [show_description_image] => 0 [num_leading_articles] => 1 [num_intro_articles] => 4 [num_columns] => 2 [num_links] => 4 [show_pagination] => 2 [show_pagination_results] => 1 [show_feed_link] => 1 [page_title] => The News [show_page_title] => 1 [menu_image] => -1 [secure] => 0 [page_description] => Joomla! - le portail dynamique et système de gestion de contenu ) ) ) [_errors] => Array ( ) )

value are overwritten by the menu parameters.
For me it's a bug that I have often signalled without anwer.
JComponentHelper::getParams MUST RETURN ONLY COMPONENTS LEVEL PARAMETERS

If its not a bug please explain how to do what i explain in my previous post.
see my last post :in general forum.
http://forum.joomla.org/viewtopic.php?f=428&t=265059

other things on parameters aspects :

why "show_vote", "show_icons" parameters are not in administrator/components/com_content/models/article.xml ?


Top
  E-mail  
 
Posted: Thu Sep 18, 2008 12:11 am 
User avatar
Joomla! Intern
Joomla! Intern
Offline

Joined: Sat Aug 20, 2005 9:56 am
Posts: 71
Location: Victor Harbor (SA) Australia
I had a similar problem. It appears that every time you link a Menu to your component, the XML configuration parameters are written into the menu parameters. Not sure why.
My problem arose from the fact that I renamed some of the parameters in the xml file, and then I was getting two similar scripts looking at the same parameter in the xml config file, and returning different results.

In my situation I simply cleared the parameters in the menu items and all was well.

I agree this needs to be looked at, but maybe not so aggressively.

Hope this helps.

_________________
Never doubt that a small group of thoughtful, committed citizens can change the world. Indeed, it's the only thing that ever has... Margaret Mead


Top
   
 
Posted: Mon Jan 12, 2009 8:35 pm 
Joomla! Intern
Joomla! Intern
Offline

Joined: Sun Mar 05, 2006 9:02 pm
Posts: 66
Checkout the wiki !

http://docs.joomla.org/Component_parameters wrote:
The following code will access the Component-wide default parameters, already overridden with those for the menu item (if applicable):
Code:
<?php
  $params = &JComponentHelper::getParams( 'COMPONENT_NAME' );

  // e.g. for the com_weblinks component, you would use:
  // $params = &JComponentHelper::getParams( 'com_weblinks' )
?>

...
You can access the Component-wide default parameter values, without the menu overrides, as follows:
Code:
<?php
  $component = JComponentHelper::getComponent( 'COMPONENT_NAME' );
  $params = new JParameter( $component->params );
?>


Good Luck !


Top
  E-mail  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

Quick reply

 



Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group