Creating More Dynamic Web Pages - Database API Required?
I would like to be able to pull individual data fields from the contact database and insert them dynamically within my content. This would, I feel, make pages more dynamic, reduce my workload, allow a high level of personaliation of member content and, I feel, enable member websites to become a little more sticky, creative and innovative. What do you think?
For example, I'd like to personalise content for each chapter/member but the content would be the same for each chapter/member. With the current system every time I create a new piece of content I then have to dupliate that piece of content for each additional chapter/member. Hence, the ability to pull a field (e.g. Chapter Name | Member Name) from the database would, I feel, allow me to create better websites that could be potentially more sticky to members.
It wouldn't stop at chapter/member names, I could use this for a myriad of stuff including personalising member content, creating dynamic content by getting clever with the contact database; I feel it would open up lots of new opportunities.
In the past I've used some sort of ODBC call on asp pages to access the database. Would the development of an API to achieve the above be useful to anybody else?
I'd really like to hear everybody's thoughts and ideas.
Kind regards
Steve
-
Leigh McCue commented
Has anyone been able to make this work? The link provided goes to a "page not found."
-
groovamatic commented
Kinglsey,
Very nice. I need this functionality, too, and was surprised it wasn't a WYSIWYG toolbar option. Can anyone point me to other examples? Membership level is my first need, but I would like to be able to address anything in Contacts/Members including custom fields.
Thanks.
-
Rick Dalven commented
Hi Chief;
I'd like to do exactly this - add a Hello {Contact_First_Name} type function to my members only page.
The link referenced in the above reply is broken.
Thanks,
Rick
-
Kingsley commented
Rick, you could try this. Just click the part of the page you want the first name to appear, click on the script button and paste the following code in. It works on the granite theme, I assume it also works on the others. Hope that helps, Kingsley.
<script type="text/javascript">
var fullname = document.getElementsByClassName('loginBoxUserName')[0].innerHTML;
var firstname = fullname.split(" ");
document.write(firstname[0]);
</script> -
Dmitry Buterin commented
Steve, thanks for posting. Before we go into a (potentially very broad) topic of dynamic pages/APIs, I wonder if this can be narrowed down to something with a simpler solution,
Can you give us more examples of stuff you would want to display on the page?
You should be able to display member's name already, see examples here:
http://help.wildapricot.com/display/DOC/Theme+overrides
Your other example was Chapter name - which I assume would be a field in the member record?