Home | Products | Consulting | Forums | Support | Order | 1-800-752-0455
  Main
Index
Search
Posts
Who's
Online
Log
In

Home: General: General:
Template Logic, good or bad?

 

 


Dave
Staff / Moderator


Oct 5, 2002, 10:47 PM

Post #1 of 8 (3930 views)
Shortcut
Template Logic, good or bad? Can't Post

Would anyone like to see template logic? eg:

<!--[ if nextpage > 0 ]-->
<a href="...">next</a>
<!--[ else ]-->
<font color="gray">next</font>
<!--[ end if ]-->

If we were to add something like this it would give a lot more control to template developers, and we'd have a lot less templatecells. But, it might make things a little more complicated.

What does everyone thing? Have you seen any template logic/code systems you really liked?

Please note, even if we do decide to go with something like this, it won't likely be in the first release of Article Manager 2.

Dave Edis - Senior Developer
interactivetools.com


MalaK_3araby
User

Oct 7, 2002, 12:05 AM

Post #2 of 8 (3919 views)
Shortcut
Re: [Dave] Template Logic, good or bad? [In reply to] Can't Post

This sounds extremely interesting Dave.

What other stuff can we do with this? can you give us more examples on what we can control?

--------------
Sure you can spell it, but do you get it?


DaveCusick
User

Oct 7, 2002, 2:17 AM

Post #3 of 8 (3918 views)
Shortcut
Re: [MalaK_3araby] Template Logic, good or bad? [In reply to] Can't Post

Yes, Dave, it'd be fabulous. I can think of a million uses for this.

In fact, only last week I ended up adapting another suggestion made in these forums as a workaround for not having if/else logic available - see the index at www.gamesolutionzone.com where articles have a little graphic telling you which console they relate to.

-
Dave Cusick (dave.cusick@livepublishing.co.uk)
Group Editor & Web Administrator
Live Publishing International Ltd
www.livepublishing.co.uk


Dave
Staff / Moderator


Oct 7, 2002, 10:03 AM

Post #4 of 8 (3906 views)
Shortcut
Re: [MalaK_3araby] Template Logic, good or bad? [In reply to] Can't Post

>What other stuff can we do with this? can you give us more examples on what we can control?

Well you'd have basic programming logic. So you'd have if, else if, else, math operators, etc.

So, all those times in the forum when people ask about displaying an image or some content in one situation, but not another, they'd be able to put some tags around it like this:

<[ if situation1 ]>
Show this html
<[ end if ]>

<[ if situation2 ]>
Show this other html
<[ end if ]>

One example might be if we supported multiple page articles in the future and you wanted to publish some content only on the last page. If their was a placeholder for total_pages and current_page you could say

<[ if current_page == total_pages ]>
display this content here
<[end if]>

Which would mean you on the last page in the set.

Does that make any sense? : )

Dave Edis - Senior Developer
interactivetools.com


MalaK_3araby
User

Oct 7, 2002, 10:56 AM

Post #5 of 8 (3901 views)
Shortcut
Re: [Dave] Template Logic, good or bad? [In reply to] Can't Post

Yes Dave ... it makes good sense.

So we will be able to run conditions using existing variables .. this is GREAT and it feels like developing our own language.

Dave.. while you are at it .. i might have a good idea for this:
How about enabling us to define our own variables from the admin interface?
Say i set a variable $var_1$ and i set the value to something like: <javascript etc... >
or $var_2$ and value is http://www.domain.com/exec/search.cgi?perpage=8&..
then i can use those variables in our if .. else statment?!

i hope i am making sense .. the idea just came to me and i jotted the thought down.

Offtopic
P.S: I am sure that alot of ppl out there fell in love with AM because its so easy to use and maintain, so it might be wise for V2.0 to stay simple enough for ppl to use right away yet still have all the Advanced Setting for power users
.

--------------
Sure you can spell it, but do you get it?


Dave
Staff / Moderator


Oct 7, 2002, 11:05 AM

Post #6 of 8 (3899 views)
Shortcut
Re: [MalaK_3araby] Template Logic, good or bad? [In reply to] Can't Post

>How about enabling us to define our own variables from the admin interface?

We want to add something like that to 2.0, where users can defined "global placeholders" that are available everywhere. So you can change the site title, copyright footer, etc, in one place and just hit republish.

Dave Edis - Senior Developer
interactivetools.com


Teambldr
User

Oct 7, 2002, 4:44 PM

Post #7 of 8 (3883 views)
Shortcut
Re: [Dave] Template Logic, good or bad? [In reply to] Can't Post

Hi Dave,



IF statements are A LOT of fun.

For example, if your have registered and unregistered users you can show items to the registered users that unregistered can't see and vice versa.

If unregistered: Show this
If registered: Show this
If Editor: Show this
etc...

So count me in on IF's!Cool
Brian

(This post was edited by Teambldr on Oct 7, 2002, 4:45 PM)


Zyllyx
User

Oct 8, 2002, 5:42 PM

Post #8 of 8 (3868 views)
Shortcut
Re: [Dave] Template Logic, good or bad? [In reply to] Can't Post


In Reply To
>How about enabling us to define our own variables from the admin interface?

We want to add something like that to 2.0, where users can defined "global placeholders" that are available everywhere. So you can change the site title, copyright footer, etc, in one place and just hit republish.

I would love you guys forever if you implemented this... Wink

 
 
 


Search for (options)
Products
CMS Builder
Article Manager
Realty Manager
Listings Manager
Order Now
Services
Priority Consulting
Support
Online Documentation
Support Forums
Support Homepage
Company Info
12 reasons to choose us!
Meet the team
Monthly newsletter
Contact Us
Toll Free: 1-800-752-0455
Phone: (604) 689-3347
Sales | Support
Conditions of Use | Privacy Policy | Copyright © interactivetools.com 2008
#201 - 2730 Commercial Drive, Vancouver BC Canada V5N 5P4