Variable for [tag]


know somebody a variable for the [tag] that i can appearing the [tag] variable in content where i like, or in view.tpl where i like.

Because i have see that the language tag “items_marked_by_tag” appears in title of the tag site the current Tag when i write in this language variable " Here this is the [tag]"

but when i use this [tag] in other lang variables for the tag view.tpl it doesnt appears.

then i have found in tags.php this

if (empty($_REQUEST['see']) || $_REQUEST['see'] != 'my') {
$view->assign('page_title', str_replace('[tag]', $_REQUEST['tag'], fn_get_lang_var('items_marked_by_tag')));
} else {
$view->assign('page_title', str_replace('[tag]', $_REQUEST['tag'], fn_get_lang_var('my_items_marked_by_tag')));

but i dont know what i must exactly do that i can use this “[tag]” in other lang variables in the view.tpl in this folder “customer\addons\tags\views\tags”

i hope sombody can help me.

thank you very much!

All of the special ‘tags’ in language variables are handled in the cotrollers before being sent as template variables like you’ve shown above. So unless you modify (or create) a controller for your specific use (possibly a pre or post controller) you will not be able to process it. You could use template syntax like:

{"Replace Tag with"|str_replace($lang.your_lang_var)}

But if you know that much about ‘tag’ in the template, there’s no need for it to be embedded in a language variable.

[quote name=‘tbirnseth’]

But if you know that much about ‘tag’ in the template, there’s no need for it to be embedded in a language variable.[/QUOTE]

Why not? You mean because tags are not language driven?

I will do a modification for it, that the tags appears only in frontent on the selected language and that the tags are multilanguage.

My Solutions for my required code

  1. tags.php in addons\tags\controllers\customer\ after line 57 i have add

$view->assign('page_description_titel', str_replace('[tag]', $_REQUEST['tag'], fn_get_lang_var('tags_description_titel')));
$view->assign('page_tags_text_description', str_replace('[tag]', $_REQUEST['tag'], fn_get_lang_var('tags_text_description')));
$view->assign('page_tags_text_descriptionbuttom', str_replace('[tag]', $_REQUEST['tag'], fn_get_lang_var('tags_text_descriptionbuttom')));

2. after it i have add the language variables for example “tags_description_titel”

3. customer\addons\tags\views\tags\view.tpl after line 5 add follow code




and this steps with the wished lang variables. And all works, i have more than only one time the tag word on the page so the density is betther for google. And yes i know its dublicated content, but for my experiences all is fine if you do this not too much.