Titles and breadcrumbs

9 posts by 3 authors in: Forums > CMS Builder
Last Post: July 22, 2010   (RSS)

By svsanchez - July 19, 2010

Dear sirs:

I have been trying to get CMS to include the title of the page in the "title tag" without luck. I also want to display a "breadcrumbs" for example if I am in a sub section I would like to show something like:

Main Section : Sub Section
TITLE OF THE PAGE BEING VISITED

How can I do this
Sven Sanchez

www.deguate.com

Re: [svsanchez] Titles and breadcrumbs

By Chris - July 19, 2010

Hi svsanchez,

Can you please post the complete PHP source code to the page you're working on?
All the best,
Chris

Re: [svsanchez] Titles and breadcrumbs

By Chris - July 19, 2010

Hi svsanchez,

This looks like a list viewer -- meaning that the page displays many records, not just one. What would you want the title of the page to be?
All the best,
Chris

Re: [chris] Titles and breadcrumbs

By svsanchez - July 22, 2010

Hi Chris, what I would like to display is the Title of the article
Sven Sanchez

www.deguate.com

Re: [svsanchez] Titles and breadcrumbs

By Donna - July 22, 2010

Hi svsanchez,

Because it's a list page, there isn't one specific article -- on a detail page you could do that no problem, but a list page has no one article -- it's got a list of them. :)
Donna

--
support@interactivetools.com

Re: [svsanchez] Titles and breadcrumbs

By Chris - July 22, 2010

Doesn't that page display multiple articles?

To make it display the first article's title as the title of the page, change this:

<title>Techos</title>

...to this:

<title><?php
if (!empty($articlesRecords)) {
echo $articlesRecords[0]['title'];
}
else {
echo "Techos"; // default title if no articles were found
}
?></title>


Does that help?
All the best,
Chris

Re: [chris] Titles and breadcrumbs

By svsanchez - July 22, 2010

Hello Donna, you are right, but what I am trying to display is the title of the section I am looking at.

Chris, thank you for the code you sent me, what adjustment do I have to make to it so it shows the title of the section being visited?
Sven Sanchez

www.deguate.com

Re: [svsanchez] Titles and breadcrumbs

By Chris - July 22, 2010 - edited: July 22, 2010

Hi svsanchez,

Oops, I should have guessed that's what you wanted!

Try this:

<title><?php
if ($selectedCategory) {
echo $selectedCategory['title'];
}
else {
echo "Techos"; // default title if no category was selected
}
?></title>


Does that work? Please let me know if you have any questions.
All the best,
Chris