Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1
  • 2

TOPIC:

Re: [HOW TO] ADD & WORK WITH PARAMS 13 Feb 2013 15:40 #6733

  • JoomGuy
  • JoomGuy's Avatar Topic Author
  • Offline
  • Moderator
  • Moderator
  • Joomla Enthusiast, Lover of Cooking
  • Posts: 1115
  • Thank you received: 195
Hi @admin,

About your question :
'params' are replaced by 'attribs' in 2.0. It will fix your problem.

Just to clarify, do you mean that the forthcoming release (v2.0) will automatically solve the issue of not being able to 'grab' the params (attribs) in the view?

Many thanks!

Gez

PS I am so damn excited about version 2 :woohoo:
Need help with your Cook/Joomla Project? . PM me to find out what I can help with. NO time wasters please!!!

Please Log in or Create an account to join the conversation.

[HOW TO] ADD & WORK WITH PARAMS 25 Apr 2014 20:57 #12413

Hello,

I can't get component's param in frontend. I set param throught admin menu item (please have a look at the attached picture).



I'm talking about param -> country

<fields name="params" label="COM_MENUS_LINKTYPE_OPTIONS_LABEL"
>
<fieldset name="menu-options"
label="COM_MENUS_LINKTYPE_OPTIONS_LABEL"
>
<field name="country" type="sql" default="0" label="COM_MENUS_ITEM_FIELD_COUNTRY_TITLE_LABEL" query="SELECT concat(c.country, ' (', l.title_native, ')') AS country FROM `vs4go_contacts_countries` as c LEFT JOIN `vs4go_languages` as l ON c.kalba = l.lang_id" />

I need to get this param -> 'country' in frontend. I have tried many ways, but after playing like 3 hours i decided to ask for help her in forum.

i would really appreciate for your help.

Please Log in or Create an account to join the conversation.

Last edit: by rasia.

[HOW TO] ADD & WORK WITH PARAMS 24 Jul 2014 07:46 #12530

Hi,

In the front-end view (fork) add in view.html.php (function displayDefault):

$jinput = JFactory::getApplication()->input;
$menu = JSite::getMenu();
$params = $menu->getParams( $jinput->get( 'Itemid',0,'int') );
$country = $params->get('country');

This is default Joomla, not Cook
The following user(s) said Thank You: admin

Please Log in or Create an account to join the conversation.

Last edit: by Romkabouter.
  • Page:
  • 1
  • 2
Time to create page: 0.053 seconds
I have been using Cook for only a day now and it is the next best thing to Jagermeister. It is very easy to use and I see some of the greatest Joomla Components ever! coming from Cook users.
Naude (Forum)

Get Started