473,287 Members | 3,253 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,287 software developers and data experts.

HTML_Template_IT getVariable -- get all variables in the current block?

hello all,

is there a function within the HTML_Template_IT package that can get
all variables in a current block? sort of the opposite of what
$template->setVariable does, ie, perhaps a getVariable?

i have a template that defines a table. the header columns will
include an image that will be the same for all columns except for the
column specified by the "&order=colName" specified in the predefined
variable $_SERVER['REQUEST_URI']. something like this simplified
example:

<!-- BEGIN HEADER -->
<tr>
<th>Author<img src="{AUTHOR_ARROW_UP}"></th>
<th>Title <img src="{TITLE_ARROW_UP}"></th>
<th>Status<img src="{STATUS_ARROW_UP}"></th>
<th>Etc <img src="{ETC_ARROW_UP}"></th>
</tr>
<!-- END HEADER -->

when "&order=author", AUTHOR_ARROW_UP will be set to "arrow_on.gif" and
TITLE_ARROW_UP and STATUS_ARROW_UP will be set to "arrow_off.gif".
similarly, when "&order=title", TITLE_ARROW_UP will be set to
"arrow_on.gif" and AUTHOR_ARROW_UP and STATUS_ARROW_UP will be set to
"arrow_off.gif". and so on for "&order=status".

i thought a good way to set XYZ_ARROW_UP would be to loop thru all
..*_ARROW_UP variables and set them all to "arrow_off.gif". then i
could set just &order=xyz to "arrow_on.gif".

i could create an array of *_ARROW_UP names, but i thought my PHP code
would be more robust if i could query all variables in the current
block "HEADER" and loop thru that list. this way i would not have to
modify my PHP code if i added a new column to the template. is this
possible? is there a better way to do this?

thanks for any suggestions.
- bettyann

Jul 17 '05 #1
0 1189

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: nick7001 | last post by:
Hi all, I am using the HTML_Template_IT package. I would like to use a template something like below. <!-- BEGIN TOPIC --> <h1>{TITLE} ....{TOPLINK}...</h1> {TOPIC-TEXT} <!-- END TOPIC -->
8
by: pertheli | last post by:
I am in a situation where only "goto" seems to be the answer for my program logic where I have to retry calling some repeated functions. Can anybody help in the usage of goto and its effect in...
2
by: Patient Guy | last post by:
I have a library of functions representing a filesystem interface (essentially a file selection interface, to be used in opening/reading/writing/closing files). Heavily scripted HTML document...
2
by: Abubakar | last post by:
Hi all, The variables declared inside try block cant be accessed inside its corresponding finally block. When I used to explain finally concept to anyone I would usually tell them (briefly) that...
2
by: Anoj | last post by:
Hi All, As you all know in vb.net we can declare block level variables. Like : Dim I As Integer For I = 1 To 3 Dim N As Long ' N has block scope in VB.NET N = N + I Next
11
by: | last post by:
Is it possible to define a variable in a block in order to make it invisible outside that block? For example, in C I can write { int a .... } then a will only be available inside the curley...
27
by: Madhav | last post by:
Hi all, I did not understand why do the global vars are initialized to NULL where as the block level variables have random values? I know that the C standard requires this as was mentioned in a...
18
by: noridotjabi | last post by:
Whilest I was browesing a tutorial today I came across the infromation that in standard C variables must be decalred at the beginning of a block. Meaning: ...
6
by: Clausfor | last post by:
Hello, I have a problem with restoring variables in the setjmp/longjmp functions: K&R2 for longjmp says: "Accessible objects have the same value they had when longjmp was called, except for...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.