How to break page title in Joomla? - joomla

I want to break a page title of the Joomla 3 website into two lines.
Can admin add <br> tag between page title field in the back end? for e.g. 'Home[br]Page'

Override the following constant
JPAGETITLE and give it a value %1$s <br> %2$s
in Extension > Language Manager > Overrides

Related

Making the article title the h1 tag joomla 3.2

I changed the standard settings of my joomla page a little, I made the article title the h1 heading on the front end and changed the settings so that the menu title does not show up. To make the article title an h1 I used a extension called header tags.
The problem was that the word "Article" showed up on every page (as the h1 tag) that did not have a menu item linked to it, i.e. all the pages that were linked to the rest of the site through another article. I resolved this with the approach listed here: http://blog.cyburg.eu/2012/02/27/fixed_suppression_of_name_articles_jglobal_articles_in_joomla_bug/
After that the h1 heading "Article" was gone, however, the article title was not made the h1 tag. Can anyone tell me how to make the article title (which is set as a h2 by standard) an h1?
Here is the code that makes up the front end:
<div class="page-header">
<h1> </h1>
</div>
<div class="page-header">
<h2>the articles title</h2>
</div>
What strikes me is that the h1 tags are still there...
I am using joomla 3.2
Copy com_content/views/article/tmpl/default.php to the html folder of your template ...
templates/templatename/html/com_content/article/default.php.
Then change around lines 45 and 56 to .
And you can cut out the whole h1 block that you aren't using at around line 29.

Display attribute image instead of text

I figure out how to show attribute in category of product list, what I need is to display an image instead of text.
Eg. I have an attribute text ASUS and a image located in media/brands/ named asus.gif or instead of Western-Digital display image located in media/brands/western-digital.gif.
I hope you understand
What you want to do is
<img src="<?php echo $this->getMediaUrl(); ?>brands/<?php echo strtolower($_product->getManufacturer()); ?>.png" />
getManufacturer may be the attribte, change it, if needed.
I found the solution:
<?php $brand=$_product->getAttributeText('manufacturer');
echo '<img style="float: right; margin: 2px;" src="/media/catalog/brands/'.str_replace(' ', '_',$brand).'.gif" alt="'.$brand.'">' ?>
If your attribute is a dropdown one you could add a new column in the table eav_attribute_option_value and in the "manage options/labels" tab of the manage attribute page in the admin panel. For each option values, next to each store traduction, you could store the name of your image and retrieve it in your templates.. it require some development but it's doable and easy to administrate.
Or the quick and dirty way : use the admin label string, lowercase it and clean to retrieve an image related filename
In the Magento 1.7.0.2 you can accomplish this in a very easy way...
All you do is create a new attribute, and select 'media image' from the 'catalog input type..' dropdown.

nolink class added with <a> for every ul and li

In Joomla 3.0, an empty <a> tag with class="nolink"(ie,) is inserted for every <ul> and <li>.
Advice me how to remove this.
We are creating the component and we are creating the tabs as of default component (for ex Newsfeed component edit page).On the first tab position the <a> tag is created.
I think I have found the problem.
This is due to a tag which is unclosed in the /administrator/modules/mod_submenu/tmpl/default.php file in line 26.
A ticket has already been created on JoomlaCode: [#29623] Missing closing link tag in submenu layout
We just have to wait the next Joomla version.
You can also add the '</a>' tag at the end of the line 26 like this:
?><a class="nolink"><?php echo $item[0]; ?></a><?php
Change the following code in the function addtoolbar in the view.html.php file.
Change the mainmenu params as false in the edit page view.
JFactory::getApplication()->input->set('hidemainmenu', false);
If we need to display the mainmenu using the above code, then the following code <a class="nolink"></a> doesn't generate in the edit page.
I tried all the default editors that came with Joomla 3.0:
(In Users -> User Manager -> Super User -> Basic Settings -> Editor:)
Editor - CodeMirror
Editor - None
Editor - TinyMCE
That problem didn't occur here. I also tried using the button on TinyMCE editor to add the ul and li tags.
Can you give more details on how did you add those ul and li tags?
What editor are you using?

How to add an additional article info on sidebar in Joomla 1.5?

I want a sidebar on article page, with additional info. Is there such a solution for Joomla 1.5.
I mean that I add an article and the info is pulled from my text between the tags e.g.
{info_for-sidebar}
Lorem ipsum....
{/info_for-sidebar}
And this info shows in sidebar for current article with actual info.
Is this possible?
Setting up something like what you are asking for require some sort of workarounds.
First, lets agree that what you are calling a "sidebar" is nothing but a content... You enter that content as a part of your article.
So, to achieve what you are asking for I would recommend you use what is called CCK - Content Construction Kit - extension for Joomla using Form2Content. There's a free light edition that would be enough.
Form2Content let you setup a content type. You define what fields you want for each content. Then you create a template that will use the info you are going to enter on the fields to built an article layout.
So let's say you are going to create 3 fields like this :
1- Intro text
2- Full text
3- Sidebar
You are going to create a template as we said. each content type will have 2 templates an intro text template and a full text template
The full text template shall be like this :
<div class="content-container">
<div class="content-sidebar">{$SIDEBAR}</div>
<div class="content-fulltext">{$FULLTEXT}</div>
<br clear="both" />
</div>
The {$SIDEBAR} and {$FULLTEXT} are the text you entered in the form and Form2Content will use it to create a regular content with layout.
If you don't want to use another extension or that solution looks too complicated, you could use a javascript solution. For example you could create an HTML module in Joomla and assign its to the sidebar. On this module switch the view to HTML code and enter this:
<div class="content-sidebar"></div>
When you enter an article, switch the view to HTML code and enter the text you want to show on the sidebar and add a class to the paragraph or the div like this :
<p class="special-content">Lorem ipsum dolor<p>
Then use jQuery to append this special text to the sidebar like this :
jQuery(".content-sidebar").append(".special-content");
Note: Joomla does not load jQuery by default, you have to add it on your template or use a plugin.

how do i link to a specfic block in a page?

I had displayed part of "latest testimonial" (textarea) on my home page, and placed a "view more" link in the end.
Now I want to link to that specific testimonial on a page when "view more" is clicked.
But I had a list of testimonials on a single testimonial page, meaning no separate detail page for each testimonial. So how can I display the specific testimonial on the page ?
<?php echo $this->getUrl('testimonial'); ?>
this gives a link to my testimonial page.
First you need to provide some element IDs on your testimonials page. For example if each testimonial is in a quote:
<blockquote id="testimonial001">
...
</blockquote>
Or place a named anchor just before each testimonial:
<a id="testimonial001"></a>
...
Then your URL can be built with a fragment:
<?php echo $this->getUrl('testimonial', array('_fragment'=>'testimonial001')); ?>
By specifying the ID through a route parameter you will override any other fragment that might get set by another module (don't know which, just know that it can happen) which is preferable to merely appending it.
example below should generate a link this this: http://www.example.com/testimonial#anchor
<?php echo getUrl('testimonial'); ?>#anchor
The rest you can find in this document: http://www.w3schools.com/tags/tag_a.asp
using this example: http://www.w3schools.com/tags/tryit.asp?filename=tryhtml_link_bookmark

Resources