Page 1 of 1

showtemplate=false not working

Posted: Thu Feb 12, 2009 10:16 pm
by unnamed7
Hi,

i'am trying to load action with mootools request.HTML and it works fine, but it loads action withe whole template, i searched forum and found that i need add showtemplate=false to params array, but it wont work for me.
what i do wrong ?

my CreateLink:

Code: Select all

$this->CreateLink($id, 'show_gallery', $returnid, '', array('user_id' =>$user_id, 'age' => $age, 'sex' => $sex, 'city' => $city, 'with_photo' => $with_photo, 'showtemplate' => 'false'), '', true)
it loads my whole homepage template

thanks for help and sorry for my poor english :)

Re: showtemplate=false not working

Posted: Fri Feb 13, 2009 8:48 am
by scooper
Here I go again with one of my less than useful replies; but I had the same problem a while back. I couldn't get showtemplate=false to work using createLink.

Rather than do the sensible thing as you've done and ask a question to find out the right way to do it I just ended up building my own link.  Since it was also just being used in a javascript call it didn't matter that it wasn't pretty.

Soo... doing it this way caused the template to show

Code: Select all

$params["showtemplate"] = "false";
$xmlLink= $this->CreateLink($id, 'eventXML', $returnid, '', $params, '', true, false,'',true, $url);
but just building the link by hand doesn't show the template

Code: Select all

$xmlLink='index.php?mact=Timeline,cntnt01,eventXML,0&cntnt01showtemplate=false';
Of course we should find out how to do it correctly, and hopefully someone can give us the right way to do it, but building the link yourself may work for you too if you need to get it sorted quickly.


s.

Re: showtemplate=false not working

Posted: Fri Feb 13, 2009 7:26 pm
by unnamed7
figured same thing yesterday :)

i just passed normal linkt to smarty and then i did something like this:

{$link}&showtemplate=false

that did the work, but its kinda bad i think.