I've been tasked with updating a page on our Joomla-powered website. Finding the page is easy enough from the contents area, but the two sections I need to edit are not on the page. Instead I find two markers: {{2}} and {{3}}. My assumption are these are placeholders for modules, but I can't for the life of me find any modules that contain the content I need to edit.
Is there a way to figure out what these place holders point to?
Joomla version is 2.5.
The curly brackets {} are typical of a Joomla Content plugin, however, normally there is more inside the brackets which can give clues to what the plugin is.
If these tags are in an Article, then I would hazard a guess that a Content plugin using onContentPrepare is processing the article body and replacing their contents. The first step will be identifying the plugin, which in turn may lead to a component (under the Components menu).
If that doesn't help — as this question is about Joomla specific implementation details, you may get a better result if you, try asking on the Joomla Q&A StackExhange site
Related
I'm new with drupal 7 and now I'm having a hard time with theme's coding, if more specific, I don't know how I should show pre-defined content. Previous developer of project said, that I absolutly shouldn't use/hardcode any content and links directly in template files and I should put it to modules/blocks (with regions). It would be ok, but design I'm coding now is too complex and has much content and just writing module for each thing - it take too much time.
I have very similar design to this one:
http://classter-html.themerex.net/
So, what is the best and right way to show content (and links) in templates? Of course, I could just hardcode it, but I'm kind of person, who follows good practices.
Let's look at the example site you gave. In Drupal it would be set up something like this:
The carousell at the top: Slick
Classter Team: A View of content type "employee" displayed in a block.
The photos: A View of the files, or of a photo content type. Or one of multiple purpose built photo album modules.
Application Features: A block with custom HTML-code.
Things that only show up at one page (like the start page) can be done using full HTML in that nodes content. Views and blocks with HTML usually solves the rest.
If you are sure that some content will never change (is not translatable or something) I don't see why you shouldn't hard-code it.
Regarding hard-coded links, use root relative paths, so if you move your site to some other domain they will still work.
I would really appreciate if anybody could help me with this question :)
I want to know whether it's possible to create your own semantic markup in PHP, just like BB Codes, but I want to be able to use it within my template engine system, so I could use it to call custom modules like voting system, adding comments, login form, registration form and so on...
Let me make it clearer for you guys of how I mean;
I'm working on my own CMS not to use it for production purposes but to learn PHP in a better way;
So I had this idea to call specific modules in a page based on their position and in order to be able to do;
For instance we're having a login module which is simply a login form, nothing too crazy, however you want to be able to include that module dynamically in any page you want using the backend and not touching any code;
So all you do in the template page is using my bb codes that I told you earlier;
Something like this;
Remember this is only an idea;
<zone name="left_sidebar"></zone>
And you add this zone markup on your sidebar and if any of your module supposed to be displayed on your left sidebar, it will just by having this markup and nothing more...
And you gone have loads of these semantic markups based on how many editable blocks you have on your page; so you could have one for the right sidebar, one for footer and one for header... etc.
So I now need to know how to could lookup for opening and closing tags, in this case it would be <zone></zone> , then it need to lookup for its attribute and its value, in this case name="right_sidevar"
....
Anybody have any idea of how I could possibly do this kind of thing...
Thanks in advance :)
You could check out TWIG; while it doesn't directly support this kind of feature (because it uses a special syntax for its own elements) it does have very good support for making your own elements, tags, sub-applications and other funky things in the backend.
http://twig.sensiolabs.org/
There are also a number of systems that perform this kind of task in the front-end; this would mean that the substitution is done by Javascript in the browser. In addition to the already mentioned Polymer, there's also Google's framework, Angular.
https://angularjs.org/
Maybe you can use php's libxml module to parse your xml file.
I'm trying to force the language swither module not to redirect to the home page if there is no menu item associations in Joomla 2.5.
I would just like to change country code in the current URL.
So that 'my-domain.com/en/menu?view=cat&id=1' translate to: 'my-domain.com/de/menu?view=cat&id=1' and so on ...
I guess I should modify modLanguagesHelper class but do not know how to create a required $language->link to work properly through JRoute.
Any help is appreciated!
Joomla usually does that by default. It seems strange that it doesn't with the approach you have followed.
Although, reading the comments you left, I understand it's not an easy task and you have already built quite a big part of the website, to go back to structure.
If I were you, I would write a small custom module to change the lang=xx or /xx/ in the URL, and redirect the user to the language they want. If you need help on that, feel free to comment below.
As per your question, I would personally go with simple string manipulation. Since you are really familiar with PHP (taking into consideration that you have written your own custom component), it should be a piece of cake for you, to:
Get the current URL
Get the current language tag
Replace the instances of lang=en with lang=de (example languages, you get the point)
Replace the instances of yoursite.com/en/ with yoursite.com/de/
Print the custom links, flags or whatever you are going to use.
It's not the suggested scenario, but you can really make a usable module if you also add:
An option for the administrator to write the language codes to use (to allow for later additions)
And make sure that you get the site name dynamically, and then you may also have a module that could be published in the JED to help others in the same situation like you!
I tried search lot on net but failed to got any solution.
Actually I want to change layout in my joomla article based on the user navigation.
For an example let say if user visiting iPhone Case studies & click on any case study(eg: Angry Bird) it contains the images/slideshow of angrybird project in iphone screen, while if the same article visit from iPad case studies page it contains horizontal image of ipad screen (Note: layout is changed).
To be short - I need the content & layout change in same article base on navigation or condition.
Is there any plugin or component which will help me to achieve this ? Any help will be appreciated.
Thanks
I think the easiest solution for this problem would be to use two different articles for each of the above said cases. That way you can easily style either of the cases the way you want. And by using one article for it, I see no particular advantage, as opposed to using different articles. If you see of any particular advantage please share it with us.
In any case if you want it to still use a single article, it seems to me that it would be a more complex solution. From what I know, there does not exist a plugin or component to cater your particular use case.
A quick and dirty solution, that comes into my mind includes the Jumi extension, which you can find here: http://extensions.joomla.org/extensions/1023/details . Jumi allows you to include PHP in your articles, etc..
You can then make an user-agent check and output everything as you need it for that particular device and for that particular article.
If you need different templates/layouts for both devices, I would recommend a theming framework, which does these things for you (applying different layouts for different devises). The T3 Framework from Joomlart does these things pretty well: http://www.joomlart.com/joomla/t3-framework-and-ja-purity-templates
I think the answer to your problem is 'Layout overrides'. Just create a layout override for the article component in the particular template folder you use for your inner-pages.
I think you should read through the following Wiki pages for a more clear understanding-
Joomla 1.5-http://docs.joomla.org/How_to_override_the_output_from_the_Joomla!_core
Joomla 1.6(Should be applicable for 1.7 as well)-http://docs.joomla.org/Layout_Overrides_in_Joomla_1.6
Hope that this solves your problem. Cheers.
I have seen another post here on Stackoverflow. Which says we can append page-class suffix to the tag. So as to style each article the way we we want, based on menu ids. This may be easier than a Layout override. Check out-
Joomla : How can we assign a different layouts to different menu IDs?
I am making a site with Joomla mainly because of the user levels. Now hands on into development enough that I cannot back out, I've realized that Joomla's theming is not as awesome as WordPress'.
When I started making the Joomla theme I realized there is no single.php like separate template for displaying article pages. But I want that when I click on an article link the page layout is wider so that the full article is more readable, basically I wanna hide the sidebar and make the article column wider when viewing a single article.
The biggest problem is that I have finished the HTML & CSS pre Joomla or any CMS jump with all the HTML5 tags and what not. I figured there would be template tags like WordPress or something similar that would give me complete control of my HTML but with Joomla everything just gets rendered as complete components with HTML and CSS all set in. It was such a pain when the pagination just rendered as a list when all I wanted was 2 links of previous page and next page. Am I doing something wrong or is Joomla just built this way.
If I start changing the components and modules the way I want, will they be changed back to defaults when I update the core. I read somewhere from 1.7 Joomla has integrated 1 click upgrades.
I sincerely hope I'm just wrong.
Sorry for jamming three questions in one but I think my title is quite explanatory so anyone looking for similar things would understand.
Thanks! I appreciate all the help.
and welcome to Joomla. Because your question(s) are long so will your answer so hold still...
First of all just to clear it up, the Joomla templating is a proper templating engine where as Wordpress is not (it's not even a CMS - check their website), this is often construed as poor coding rather than best practice as it's more of a steep learning curve.
1) I wanna hide the sidebar and make the article column wider when viewing a single article.
This can be done through conditional assignment within your template, if around your RH column in your template you can place this if statement:
if (JRequest::getString('option') != 'com_content' && JRequest::getString('view') != 'article') { echo '<div id="myRightHandColumn"><jdoc:include type="modules" name="right" style="xhtml" /></div>'; }
You will also need to apply this code to add a class to your wrapper around your main content to tell your CSS to make it wide.
2) give me complete control of my HTML but with Joomla everything just gets rendered as complete components with HTML and CSS all set in
That's not entirely true, all WELL made extensions have a views folder containing overridable html output. For example if you wished different HTML to be outputted for the article view from com_content you would copy this file:
/components/com_content/views/article/tmpl/default.php
and place it in your template like so:
/templates/your_template_name/html/com_content/article/default.php
3) If I start changing the components and modules the way I want, will they be changed back to defaults when I update the core.
Assuming you follow my instructions and use overrides rather than core-hacks then you will not lose changes when upgrading the core. Naturally you should never upgrade in a production environment.
If any parts are unclear just drop a comment and I will help as best I can.
You are definitely doing it wrong, Joomla's templating system is far more advanced and flexible than WP. You need to read up on the template override system and how to use collapsible module positions. The official documentation is still 1.5 focused, but it's pretty much the same thing as far as overrides and modules are concerned.
Overrides - http://docs.joomla.org/Understanding_Output_Overrides
Collapsing columns - http://docs.joomla.org/Collapsing_columns
All template docs - http://docs.joomla.org/Template_Development
You should also look in to the new template style options.