HTML Logo by World Wide Web Consortium (www.w3.org). Click to learn more about our commitment to accessibility and standards.

Moving forward with Composr

ocPortal has been relaunched as Composr CMS, which is now in beta. ocPortal 9 will be superseded by Composr 10.

Head over to compo.sr for our new site, and to our migration roadmap. Existing ocPortal member accounts have been mirrored.


Use tempcode in HTML files?

Login / Search

 [ Join | More ]
 Add topic 
Posted
Rating:
#92412 (In Topic #18530)
Avatar

Fan in action

Simple question. Can we use the tempcode directly in .html files or is it necessary for that file to be .tpl type to parse the code?

And, does the {$BASE_URL} point to www.example.com/index.php or just www.example.com? Because if I had to go to a subpage, what would I write?
1. {$BASE_URL}/page/subpage
or,
2. {$BASE_URL}/index.php/page/subpage?

Trying to integrate a sliding login panel and needed to know these to modify the code.
Back to the top
 
Posted
Rating:
#92414
Avatar

Fan in action

Plus, if I want something diplayed only if the user is logged out, i.e, $IS_USER_GUEST then, how do I do it?
I mean, $IS_USER_GUEST should return a boolean value, so how do I store that value and/or make an IF satatement out of it?
Back to the top
 
Posted
Item has a rating of 5 (Liked by pawan)  
Rating:
#92416
Avatar

Community saint

pawan said

Simple question. Can we use the tempcode directly in .html files or is it necessary for that file to be .tpl type to parse the code?

And, does the {$BASE_URL} point to www.example.com/index.php or just www.example.com? Because if I had to go to a subpage, what would I write?
1. {$BASE_URL}/page/subpage
or,
2. {$BASE_URL}/index.php/page/subpage?

Trying to integrate a sliding login panel and needed to know these to modify the code.
#1

 :thumbs:

Take my advice. I'm not using it!

View my working ocPortal site (version 9.x.x) at Anglo-Indian Portal
Back to the top
 
Posted
Item has a rating of 5 (Liked by pawan)  
Rating:
#92423
Avatar

Community saint

pawan said

Simple question. Can we use the tempcode directly in .html files
Simple answer. No.

pawan said

or is it necessary for that file to be .tpl type to parse the code?
Tempcode need to be processed on the server which is triggered by a .php file. The .php file pulls in and processes the tpl files to render the desired layout.

pawan said

Trying to integrate a sliding login panel and needed to know these to modify the code.

You could probably just place the required html within a [html] tag or a custom comcode tag.

pawan said

I mean, $IS_USER_GUEST should return a boolean value, so how do I store that value and/or make an IF satatement out of it?
See: View topic: Block Visibility Based on User Group - ocPortal.com .

Do you have a Samsung Galaxy S / Galaxy S II ? If so, why not check out my ScreenFree FM Radio .
Back to the top
 
Posted
Rating:
#92427
Avatar

Fan in action

Thanks to both of you. But the problem is that I want it to be placed at the top of the site, above everything else, so I dont think there is a way to place it there using comcode or internally through ocPortal.

If I am thinking right, that would mean a new panel would have to be made that sits on top of everything else, and the comcode/tempcode placed in it. But I am still not sure that would place the thing perfectly.
Back to the top
 
Posted
Item has a rating of 5 (Liked by pawanLiked by Jean)  
Rating:
#92428
Avatar

Community saint

I assume you're on v9, in which case you can place it in GLOBAL_HTML_WRAP.tpl .

It doesn't need to be in its own panel, just find a suitable place within GLOBAL_HTML_WRAP.tpl .

Do you have a Samsung Galaxy S / Galaxy S II ? If so, why not check out my ScreenFree FM Radio .
Back to the top
 
Posted
Rating:
#92429
Avatar

Fan in action

Ah, ofcourse. I should have thought that. Thanks temp1024  :thumbs:
Back to the top
 
1 guests and 0 members have just viewed this: None
Control functions:

Quick reply   Contract

Your name:
Your message: