I'm creating a site for my mortgage company and I'm trying to use Pagesetter to display current interest rates, Rate Sheet.
Is there any way after I define 1 variable of what I'll call baserate, which for example I would update each day, and publish a new document. Today I would call the baserate 6.
In my template what would I need to put to add #'s to the base rate.
For example, a cash out refinance I would need to add .5 to the base rate, and I would have many rates, but would all depend on the base rate. How can I translate this very simple math?
Watch
GitHub Core
Show your support for Zikula! Sign up at Github account and watch the Core project!
GitHub Modules
- internetking created topic »password problem« 25. May
- mesteele101 responded to »ERR (3): E_USER_ERROR: Smarty error: [in pagesvar:pagesitem2en line XXX]…« 25. May
- mazdev responded to »Pages 2.5.0 and updating - Page not found« 25. May
- ehdwma created topic »Hide "Register new account" and change template to 3 col« 25. May
- mesteele101 responded to »Zikula 1.3.3 - Selecting a category in Pages not working« 25. May
- mdee created topic »How to implement returnpage ?« 25. May
- nestormateo responded to »Fillters in Clip« 24. May
Zikula Blog
- Anatomy of Open Source Projects on Mar 07
- Continuous Review on Mar 01
- Not Invented Here on Feb 24
- How to Contribute Your Code at Github on Jan 13
- 10 Steps to Coding-Nirvana: Tips for Successful Module Writing on Nov 12
- Submitting Bug Report Tickets That Get Results on Aug 17
- Cozi Tricks #1: Syntax Highlighting on Aug 07
Login
Pagesetter Adding Variables?
-
- Rank: Software Foundation
- Registered: Sep 03, 2002
- Last visit: May 09, 2010
- Posts: 909
Yes. mmmh let me think
1. add a new publication type called "baserate" with only that one field called "baserate"
2. publish a new article for that pubType with your first value - say 5
3. open the template of the other publication type - there where you need that value added
4. Say you called that value here "int" (e.g. 3 )and you want to all your baserate (e.g. .5)to it. the value you entered as baserate is 5 so you need to combine the strings "3", "." and "5" while the numbers are contained in the variables $int and... yes - where is the baserate?
5. fetch the baserate. As your publication in the baserate publication type was the first I assume it has the ID 1 and As you have one other publication type I assume that the baserate type has ID 2 So it's tid=2 and pid=1
You can get all the values with this code:
Code
<!--[ pnmodapifunc modname="pagesetter" type="user" func="get" tid=2 pid=1 assign="baserate" ]-->
6. As I haven't tried what I write here, You should test if this works. I am not sure if "get" is the right API call. Addat the end of the template and check the popup (popupblocker!) for the baserate. When it's there I assume on the left column it says "baserate" and also on the right side "baserate"Code
<!--[ pndebug ]-->
7. Now back to combining the strings. I am not too sure how that works, but AFAIK it should work like this:Code
<!--[ capture name="myFactor" ]--><!--[ $int ]-->.<!--[ $baserate.baserate ]--><!--[ /capture ]-->
8. Now you have a new variable called "myFactor" and you can use that to make your equations. e.g.:
Code
<!--[math equation="x*y" x=$price y=$myFactor]-->
For more infos on the template stuff check out the Smarty manual or my pnRender CheatSheet
As I said: I didn't test all this. You have to look into it yourself but I think I pointed into the direction. If you like you can buy me a small thank you
--
best regards from Kiel, sailing city
Steffen Voss
Member of the Zikula Steering Committee
Read The Zikulan's Blog "If you want people to RTFM, make a better FM!"
- Moderated by:
- Support
