SimplePortal
Customization => Themes and Graphics => Topic started by: fdr77 on August 19, 2010, 09:27:38 PM
-
I wanted to know if it was possible to put a meta desciption to home page
in the index template is
<meta name="description" content="', $context['page_title'], '" />', empty($context['robot_no_index']) ? '' : '
tried to change so
<meta name="description" content="' , (isset($context['categories']) ? 'Il Forum rivolto al Discus. Sezioni per dibattere sulla riproduzione, allevamento, malattie e biologia del Discus con gallerie fotografiche e video.' : $context['page_title']) , '" />', empty($context['robot_no_index']) ? '' : '
but this modific is for the forum and don't like to google because lose title of the topic
You can only do something for the home page ?
thank you :)
-
How about:
<meta name="description" content="' , $context['page_title', (isset($context['categories']) ? 'Il Forum rivolto al Discus. Sezioni per dibattere sulla riproduzione, allevamento, malattie e biologia del Discus con gallerie fotografiche e video.' : ''), '" />', empty($context['robot_no_index']) ? '' : '
-
Thank a lot and sorry for the disturd.
I'll try this way and you 'll know
-
sorry but your modification report this error:
Il file che si รจ tentato di salvare ha generato il seguente errore:
Parse error: syntax error, unexpected ',', expecting ']' in index.template.php on line 74
I think the lack of a ] in
<meta name="description" content="' , $context['page_title', (isset($context['categories']) ?...........
I corrected in this mode:
<meta name="description" content="' , $context['page_title'], (isset($context['categories']) ?.......
It's ok?
-
Yes -- looks like I made a typo. Good catch!
Does this do what you want?
-
not really but I think what I try is not possible.
My site is composed of SMF 1.1.11 (forum) and simple portal (home page)
I would like to be the home (SP) to have this meta description, and not the forum
-
I believe this is possible. The portal page gets displayed because of some setting saying to display the portal page.
I am sorry to say that I do not know how, in template_html_above, to check if this should be the portal page or not. I bet somebody else here does, though.
-
Thanks anyway I 've helped a lot in those days.
if anyone knows how I'm all ears :)
-
$actions[$_REQUEST['sa']][1]();
}
if ($_REQUEST['sa'] == 'articles')
$context['SPortal']['is_frontpage'] = true;
$actions[$_REQUEST['sa']][1]();
}
Then use "!empty($context['SPortal']['is_frontpage'])" to check if the frontpage is set or not.
-
Thanks. I knew there would be a simple solution.
-
thanks :nervous-happy: