Message Text |
Hi Paul,
I seem to be a little confused on the how to utilize the JavaScript export function. I am trying to dynamically create a listing to be shown on portion of my site outside of the WSN Directory section, that is, I want to show a particular listing I have generated on a WordPress installation within my site.
If i understand correctly, here are the steps I need to take:
1. Go to admin > Misc > JavaScript Export
2. On the first text area, I need to enter the previously generated listing (in my case, it is <CONFIG>links[,]title;typeorder[,]5[,]ascending[,]type='premium'[,][,]0[,]0[,]0[,]0[,][,]0[,]0[,]title[,]0[,][,][,]</CONFIG>)
3. On the second text area field, I need to enter the name of the JS I wish to give the particular script. In my case, I named it exactly as biz_of_the_month, without the .js at the end, is this correct? Or should I name it biz_of_the_month.js?
4. Click on Save
5. If desire, I need to go to admin > Templates > Manage Templates > Misc Templates > JavaScript Export and edit the template any way I want to. In my case, I modified it as follows:
<!-- BEGIN TOPLIST 5730 -->
<div class="col-left-featuredbusiness">
<li><CONFIG>links[,]title;typeorder[,]5[,]ascending[,]type='premium'[,][,]0[,]0[,]0[,]0[,][,]0[,]0[,]title[,]0[,][,][,]</CONFIG>
<p><img src="http://downtownwheaton.com/dir/attachments/billys-closet.jpg" alt="Featured Business" width="143" height="80" class="img_left" /></p>
<p class="Captions"><span class="MuseoSans-700-CapsSmaller"><a href="{LINKDETAILSURL}">{LINKTITLE}</a></span><br>
{LINKDESCRIPTION} <a href="{LINKDETAILSURL}">More ></a><br />
<a href="{LINKURL}"target="_blank">{LINKURL}</a><br></p>
</div>
<!-- END TOPLIST 5730 -->
6. Then I need to place the following html code into any page where I want to show the above listing:
<script language="javascript" src="http://mysite.com/dir/javascript/biz_of_the_month.js"></script>
7. and like magic, the listing will appear in the form specified on the template.
Did I get this right? If so, when I add the html JS code on a test html page, nothing is showing up.
Please advice if I got any steps screwed up.
Thanks a bunch, Paul.
Rodrigo |