Extension building question

Discuss PivotX 2.0.x extensions here, and view extensions that are available for download.

Re: Extension building question

Postby kenada » Wed May 09, 2012 10:01 pm

I GOT IT!!!!!

Code: Select all
[[ if $page.extrafields.use_fake_download=="on"]]

<script language="javascript" type="text/javascript" >
function show_alert() {
var msg = "[[$page.extrafields.fake_download_alert_message|replace:'<p>':''|replace:'</p>':''|replace:'<br />':'\n']]";
alert(msg);
}
</script>
[[/if]]


So we have to use the wysiwyg editor to make this work correctly but above is the working code! :)
Thanks you so much guys, I was really about to give up.
kenada
 
Posts: 18
Joined: Thu May 03, 2012 8:28 pm

Re: Extension building question

Postby Harm10 » Wed May 09, 2012 10:22 pm

Within php you can access the vars like this:
Code: Select all
$yourvar = $this->_tpl_vars['page']['extrafields']['fake_download_alert_message'];

But as I was writing this I noticed you found it. But I'd like to you let you know this method.
Quality is in the detail of things............

Want to change or update your PivotX site? Mail or PM me!
I can also convert your site to a Wordpress site!
Harm10
Developer
 
Posts: 2011
Joined: Wed Jun 17, 2009 9:37 am
Location: Somewhere in The Netherlands (aka Holland)

Re: Extension building question

Postby kenada » Thu May 10, 2012 1:23 am

Thanks Harm10!! Next step is to build a menu system. Anyone know if one has been created already?
If I have to figure it out and build it myself I will, would rather not have to though.

When it is all said and done I will have to take everything I have created so far and build it into
one extension. Right now everything is build using the extra fields extension and template files.
kenada
 
Posts: 18
Joined: Thu May 03, 2012 8:28 pm

Re: Extension building question

Postby Harm10 » Thu May 10, 2012 5:35 am

How about extension Hierarchical menu's? http://extensions.pivotx.net/entry/33/menu
Quality is in the detail of things............

Want to change or update your PivotX site? Mail or PM me!
I can also convert your site to a Wordpress site!
Harm10
Developer
 
Posts: 2011
Joined: Wed Jun 17, 2009 9:37 am
Location: Somewhere in The Netherlands (aka Holland)

Previous

Return to 2.x Extensions

Who is online

Users browsing this forum: No registered users and 2 guests

cron