-
AuthorPosts
-
December 1, 2010 at 3:32 am #156939
Hello,
I need to separate a page title from the front page content!
How do I do that?
The original template was showing default title – “Welcome to the Frontpage” in the componentheading_fp class h1 on the front ja-current-content div.
I created my own SEO friendly title and it is much longer to fit there, moreover it describes the purpose of the website in general, and does not necessary correspond to what I want to display in this front div.
I need the page title to be the page title, and the column header to be separated and editable!?
Saguaros ModeratorSaguaros
- Join date:
- September 2014
- Posts:
- 31405
- Downloads:
- 237
- Uploads:
- 471
- Thanks:
- 845
- Thanked:
- 5346 times in 4964 posts
December 1, 2010 at 6:56 am #364939You try to find a extension on the Joomla Extension Directory, i see one http://extensions.joomla.org/extensions/site-management/seo-a-metadata/3521
it might help you 🙂
December 1, 2010 at 4:45 pm #365020I think you don’t understand the question!
Your designer made a Home page title to appear on the main article’s block, in the very middle of front page!! I am talking about the block in a “body” position – It is not in a module list. Therefore, the title of this block is not customizable!!
Just tell me please, where to find this include: <jdoc:include type=”component” />
which appears in this code:<div id=”ja-current-content” class=”clearfix”>
<jdoc:include type=”component” />
</div>
I will have to hardcode the title for this block in h1.componentheading_fp
Thank you
Sherlock FriendSherlock
- Join date:
- September 2014
- Posts:
- 11453
- Downloads:
- 0
- Uploads:
- 88
- Thanks:
- 221
- Thanked:
- 2478 times in 2162 posts
December 2, 2010 at 7:43 am #365093Dear sloger,
You can go to the file of templatesja_quartzhtmlcom_contentfrontpagedefault.php file,here you would see the below codes
<h1 class=”componentheading<?php echo $this->escape($this->params->get(‘pageclass_sfx’)) ?>”>
<?php echo $this->escape($this->params->get(‘page_title’)); ?>
</h1>Just change
<?php echo $this->escape($this->params->get(‘page_title’)); ?>
To the page title you wantedDecember 2, 2010 at 2:29 pm #365132Thanks a lot for the path!
But I have just realized that I can’t hardcode this title, because I have 2 languages on the website, and it has to change dinamically, according to the language selected – en or ru
Is there any conditional statement that I could place in this code, like:
<?php if (‘some condition for english language’) : ?>
My title in English
<?php endif; ?>
<?php if (‘some condition for russian language’) : ?>
My title in Russian
<?php endif; ?>The above code is just a sample – I’m just guessing!?
Also, I could use a title from another module there, the one which I don’t use on the page, like “Popular” forexample – position user2.
So, please let me know what could be a conditional statement for changing languages or give me the path to this code :
<jdoc:include type=”modules” name=”user2″ style=”xhtml” />Sherlock FriendSherlock
- Join date:
- September 2014
- Posts:
- 11453
- Downloads:
- 0
- Uploads:
- 88
- Thanks:
- 221
- Thanked:
- 2478 times in 2162 posts
December 6, 2010 at 2:45 am #365346Dear sloger,
You can try with a conditional statement like this
[PHP]
<?php $lang = JFactory::getLanguage();
$tag = $lang->getTag(); ?><?php if ($tag == ‘en-GB’) : ?>
Your title in English
<?php endif; ?><?php if ($tag == ‘ru-RU’) : ?>
Your title in Russian
<?php endif; ?>
[/PHP]I Hope it would help !
-
AuthorPosts
This topic contains 7 replies, has 3 voices, and was last updated by sloger 13 years, 11 months ago.
We moved to new unified forum. Please post all new support queries in our New Forum