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

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.

Related

Custom sections Umbraco

Not even sure I labeled this correctly, I am in the process of converting a site to Umbraco, and there are sections of the site that needs to be edited using the CMS tools in the back end, basically it is a grid with pictures and description text
Here is a sample of the HTML
<div class="hi-icon-effect-1 hi-icon-effect-1a">
<a class="hi-icon">
<img class="img-responsive " id="ImgSales" src="../../Images/sales_icon_circle_grey.png" alt="">
</a>
<p style="padding-left:5px;" id="lblSales" class="">Sales</p>
</div>
What I would like to be able to do is go to the content section of the admin and edit the list of items and configure the image and text for each item.
http://www2.strikemedia.co.za/
If you view the above link and scroll down there will be a grid of items (services) and it is this list that I want to be able to generate.
I am comfortable with all the technologies used in Umbraco, I just do not know the system well enough to do these kinds of modifications, can someone please assist or point me to the resources that will help me build this.
Thanks
You should take a look at the Archetype package: https://our.umbraco.org/projects/backoffice-extensions/archetype/
As far as I understand your question you are looking for a way to add X amount of similar items to the contents of a page - for this, Archetype is probably perfect :-)
Once you have your list of items added inside Umbraco, look here: https://github.com/kgiszewski/ArchetypeManual/blob/master/03%20-%20Template%20Usage.md
Use case #1 in this example will allow you to iterate through items and output it with whatever "template" you want (aka the HTML sample you provided).

I need an answer related to odoo

In odoo 9 we create our own template of home page but on this page we are unable to use the editor elements from the editor. It's color change to red when we hover on the structure elements
for this you need to define attribute customize_show="True" while defining the template like this -
<template id="custom_template" inherit_id="optional" customize_show="True">
.
.
.
</template>
you get that error because your wrapper around your entire page is missing and id and a class on your general div, your code should look like this:
<div id="wrap" class="oe_structure oe_empty">
#your page code goes here
</div>
on the other hand customize_show="True" is an option on the templates to give the user the option to enable o disable templates on the frontend, this will display the template name with a toggle/checkbox on the website editor menu "Customize"
best regards.

Where to access/alter content generated by Joomla module

I have been tasked with adding a single link to a Joomla v1.5 site. For sake of brevity I won't include the backstory. Long story short ... this Joomla site is being replaced in the near future with Drupal. For the time being I need to add some content to the Joomla version.
I have a menu that consists of a series of <li> items that are hyper links to other pages. I can view the HTML source using FireBug so I can see that the Joomla template code is generating.
The Joomla template code is ...
<jdoc:include type="modules" name="menu5" />
it creates the following HTML
<li>Link #1 Text</li>
<li>Link #2 Text</li>
<li>Link #3 Text</li>
<li>Link #4 Text</li>
I can view the module named menu5 via the Joomla interface but I cannot see any way to edit the content it generates. I can change meta data regarding the menu (Title, Position, Order, Access Level, etc ..), but nothing about changing the content the menu generates. All I want to do is to insert another link in this list. I could modify the template and hardcode it except it needs to be inserted in the middle of the list.
Any Joomla gurus out there that could tell me where to modify the content this module generates?
It sounds like it's a Joomla! Menu module (in the Module Manager you can check the type column and see if its a menu type).
If it is a menu, you will need to use the Menu menu to select the right menu and then add a menu item to it. (Sorry for all the menus, it's a self referential subject).
Typically the menu module will have the same/similar name as the Menu it displays.

How to add content tags in all articles (Joomla)

I have found a great plugin that sets Facebook comments on an article where you write down {fcomment}.
The problem with this is that you have to manually put this in each article, what is time consuming work.
Is there a method to put specific content in header / footer (in this case {fcomment) that display Facebook comments) of each article?
Thanks
Use ReReplacer and then match some part of the article html and add your custom tag, like:
Match: <span class="article_separator"> </span>
Change to: {fcomment}<span class="article_separator"> </span>

Blogger template: Style blog post based on label

I'm trying to change the style of a blog post (for instance change the title color), based on the labels associated to the post.
I'm a bit new to the templating, so I though I would be going to add a class with the label in the title <h3> element, and then add my CSS rules.
So I found this which would generate a proper list of labels separated by a space:
<b:loop values='data:post.labels' var='label'><data:label.name/> </b:loop>
However, it seems the validator does not let me add this inside the class attribute as follow:
<h3 class='post-title entry-title <b:loop values="data:post.labels" var="label"><data:label.name/> </b:loop>'>
From there, I found half the solution. Apparently, I should use expr:class instead of class as follow:
<h3 expr:class='"post-title entry-title " + data:list_of_labels'>
So now:
- How can I build this variable data:list_of_labels? (basically how to set a variable)
- Is there a full description of the template syntax somewhere?
- Is there another way to go around this?
Thanks,
JB
This should do it. Using XML entities allows you bypass the XML validation and move the Blogger functions to where you need them. Longer explanation here: http://www.karlhorky.com/2012/06/add-blogger-labels-to-post-as-css.html
<div class="post<b:if cond="data:post.labels"><b:loop values="data:post.labels" var="label"> <data:label.name></data:label.name></b:loop></b:if>">
<data:post.body>
</div>
There is no way to set variables in the blogger data xml, however you can set variables using javascript.
There are many pages on the blogger data xml. Google is your friend. For example this one.
You are on the right track: do a loop, use javascript to check for the combinations you want, change the style properties or load a css file dynamically.

Resources