Hi All,
First off I want to say hi and how much I am totally loving CMSMS!!!! This thing really rocks and I can't wait to use it for my clients.
Now on to my question: I am trying to hide the {title} on the home page
{if $page = "Home"}
nothing
{else}
{title}
{/if}
Now I notice that CMS caches the variable "Home" - (I found this out by using {$smarty.get.page} ) -
How do I get around this??
Thanks for your help in advance - and again - I LOVE CMSMS!!!!
Best Regards,
Jessica
"Nothing in this world can take the place of persistence.
Talent will not; nothing is more common than unsuccessful people with talent.
Genius will not; unrewarded genius is almost a proverb. Education will not;
The world is full of educated derelicts. Persistence and determination alone are omnipotent.
The slogan 'press on' has solved and always will solve the problems of the human race." -- Calvin Coolidge
Using URL ?page=???? in if then statement
Re: Using URL ?page=???? in if then statement
The way i did it was make a completely different template for the homepage. So my homepage doesn't display the breacrumbs and makes other things look different. Then on every other page i use a different template that includes that stuff.
That's the easiest way i found.
That's the easiest way i found.

Re: Using URL ?page=???? in if then statement
Thanks I didn't think about that duh!! I just downloaded this thing and I am having a blast with it, it is so easy to use!!
Thanks Again
Jessica
Thanks Again
Jessica
Re: Using URL ?page=???? in if then statement
Hi,
I have the same problem but I don't want to use a different template for each page (lot of work if you want to change the template of your site).
Is there another solution ?
Cheers
Geraud
I have the same problem but I don't want to use a different template for each page (lot of work if you want to change the template of your site).
Is there another solution ?
Cheers
Geraud
Re: Using URL ?page=???? in if then statement
you shouldn't use $page, but $_get['page'] there's a very big chance your registerglobals are on.
Re: Using URL ?page=???? in if then statement
For my site, I wanted several different types of pages, which meant different templates, but have a lot of the same stuff appearing on each. My solution was to make HTML Blob modules for each kind of thing on the page. For example, there's a blob for everything in the , another for the page header, and another for the page title block (which in this design is not the same as the header). Content area, footer, sidebar, etc.geraud wrote: I have the same problem but I don't want to use a different template for each page (lot of work if you want to change the template of your site).
With all these blobs, I could then easily drop them into different templates. The templates roughly 12 lines long, each using slightly different combinations of Blobs. Change a Blob, and all the page designs change.
Michael
Re: Using URL ?page=???? in if then statement
Here is my solution to a similar problem:
I created an extra tag (a function.pageshow.php in the plugins folder for example) and used the following function:
function smarty_cms_function_pageshow($params, &$smarty) {
global $argv;
$query_string = $_SERVER['argv'][0];
$pg = strstr($query_string, "page=");
return $pg;
}
This should return "page=????" if there are no trailing variables. One can play a bit with the string parsing and get the desired result. The function can be then easy used for templates with {pageshow}.
I created an extra tag (a function.pageshow.php in the plugins folder for example) and used the following function:
function smarty_cms_function_pageshow($params, &$smarty) {
global $argv;
$query_string = $_SERVER['argv'][0];
$pg = strstr($query_string, "page=");
return $pg;
}
This should return "page=????" if there are no trailing variables. One can play a bit with the string parsing and get the desired result. The function can be then easy used for templates with {pageshow}.
Last edited by xviper on Wed Apr 19, 2006 7:58 am, edited 1 time in total.
Re: Using URL ?page=???? in if then statement
The html blob and global content blob looks attractive option but am wondering if it wont in anyway going to affect the loading speed of the site? Am a new person to both cmsmadesimple and programing but i am having a feeling using only blobs may affect the speed of the site. Someone correct me and set me straight pleas.thetallguy wrote:For my site, I wanted several different types of pages, which meant different templates, but have a lot of the same stuff appearing on each. My solution was to make HTML Blob modules for each kind of thing on the page. For example, there's a blob for everything in the , another for the page header, and another for the page title block (which in this design is not the same as the header). Content area, footer, sidebar, etc.geraud wrote: I have the same problem but I don't want to use a different template for each page (lot of work if you want to change the template of your site).
With all these blobs, I could then easily drop them into different templates. The templates roughly 12 lines long, each using slightly different combinations of Blobs. Change a Blob, and all the page designs change.
Michael