Page 1 of 1
problem with cms_selflink or CMS MS core?
Posted: Mon Apr 16, 2007 10:52 am
by kazkas
I use CMS MS 1.0.4. In Edit content Source View I create a link over image: , like it is in tag's help page. I click Save, Open this page again, go to Source mode, and instead of that link I have:
I think it's an editor's bug. Can anybody fix it?
Re: problem with cms_selflink or CMS MS core?
Posted: Mon Apr 16, 2007 4:34 pm
by Pierre M.
kazkas wrote:
...I think it's an editor's bug. Can anybody fix it?
If you think you have find a bug, you should fill a bug report.
http://dev.cmsmadesimple.org/projects/cmsmadesimple
It will help the dev team fixing it. AND you will know when it get fixed.
Pierre M.
Re: problem with cms_selflink or CMS MS core?
Posted: Mon Apr 16, 2007 5:01 pm
by bladenet
{cms_selflink} produces links, so instead of you just type
{cms_selflink page="alias" image="next.png" text="Next"}
read the tag documentation uder extensions.
Re: problem with cms_selflink or CMS MS core?
Posted: Tue Apr 17, 2007 10:28 am
by kazkas
bladenet wrote:
{cms_selflink} produces links, so instead of you just type
{cms_selflink page="alias" image="next.png" text="Next"}
read the tag documentation uder extensions.
Yes, exept when you nead something more complex than just a text link or image link. Or You want some extra flexibility with image used as link. I.E. how you will set image width/height/class/id with {cms_selflink page="alias" image="next.png" text="Next"} ?
Re: problem with cms_selflink or CMS MS core?
Posted: Tue Apr 17, 2007 8:55 pm
by bladenet
You're right. that's why i use User definded tags, or export variables to smarty.
you can make smarty variables from whitin modules like this:
Code: Select all
$smarty->assign('variablename', $localvariable);
or
Code: Select all
$smarty->assign('variablename', $this->somefunction(parameter, parameter));
and then use it in templates like {variablename}
the other option i know is to use a UDT like this:
Code: Select all
global $gCms;
$smarty =& $gCms->GetSmarty();
$variable = $smarty->get_template_vars('variablename');
$othervariable = $smarty->get_template_vars('othervariablename');
return '<a href="'.$variable.'">'.$othervariable.'</a>';
you need to be sure 'variablename' is a real variable or you've set it up. you can use {get_template_vars} in a template to display the available variables.
Hope i have helped. Cheers.
Re: problem with cms_selflink or CMS MS core?
Posted: Fri May 04, 2007 8:09 pm
by JM
I am encountering the same problem:
Just paste the example code from the "href" attribute description in the {cms_selflink} tag help to a new page (while the editor's "Source" mode is active) and switch the "Source" view off and on again. The code gets all screwed up.
Example:
Switch to HTML view and back, after this:
This obviously an error and should be fixed. Maybe the solution could be to have the parser ignore every " inside tags (if they are not parsed at all, I don't know that).
Re: problem with cms_selflink or CMS MS core?
Posted: Sat May 05, 2007 12:43 am
by calguy1000
okay, that last message tells me that there is an issue with the wysiwyg editor, not with {cms_selflink}. to prove this concept you could try turning the wysiwyg off (in user settings) and see if it still happens.