it seams i look around all the file in
templates/mytemplate/html/com_content/category/blog.php
I could find there, how to edit category blog title and some other things too. But the most important thing i couldn't find, where can i edit article title, image, text. and make them to look as I want.
where it should be title, image and text i could find only a php code
$this->item = & $item;
echo $this->loadTemplate('item');
If anyone can guide me, which file i have to edit, to make my title of an article, image and text look as i want?
Once you have the override, find the code in:
your_template/html/com_content/category/blog_item.php
Code for title in category blog:
<?php echo JLayoutHelper::render('joomla.content.blog_style_default_item_title', $this->item); ?>
Code for Intro image in category blog:
<?php echo JLayoutHelper::render('joomla.content.intro_image', $this->item); ?>
Related
I'm trying to add an image before the title in gitbook style bookdown project. This is similar to this question from the RStudio Community page, but I would like the image to appear only before the title, not every top-level heading.
I've created a reprex here: https://bd-reprex.netlify.app/
I've edited the _output.yml to include:
bookdown::gitbook:
...
includes:
before_body: assets/logo.html
However, as can be seen in the example above, the image now appears before every chapter, not just before the title.
Any help would be greatly appreciated!
This question was answered here.
The solution is to add a JS codeblock to the end of the index.Rmd file, such as
```{js, echo = FALSE}
title=document.getElementById('header');
title.innerHTML = '<img src="/path/to/img.png" alt="Test Image">' + title.innerHTML
```
From https://bookdown.org/yihui/rmarkdown-cookbook/latex-logo.html
title: |
![](logo.jpg){width=1in}
Adding a Logo to LaTeX Title
NB: although you cannot see them, there are two trailing spaces after {width=1in}, which means a line break in Markdown. Without the line break, the image and the title would be on the same line, which may not be what you desire.
See also related question: How to have Frontpage Image before chapter title and book title?
If I click on a product from my product overview on the left side, the shop does not load with the list.phtml. As soon as I swap view to grid or list, it swaps to the list.phtml file and everything is fine. But as I said, if I click on the products on the sidebar, it doesnt work (it's not even affected by list.phtml at all). I removed all the code inside it and it still showed (a bit different, that's why I want to change it) the products, but as soon as I swapped mode, everything disappeared -- as it should. Do you know where I can change that?
Thank you.
It should use list.phtml file. In that file it is defined for both list mode and grid mode.
<?php echo $this->getToolbarHtml() ?>
<?php // List mode ?>
<?php if($this->getMode()!='grid'): ?>
<?php $_iterator = 0; ?>
And
<?php else: ?>
<?php // Grid Mode ?>
<?php $_collectionSize = $_productCollection->count() ?>
You can see something like above code in your list.phtml file,one is for list mode and another for grid mode. This is the default case unless you haven't changed the layout or template code.
If you want to know the file location than you can always enable template path hint. If you don't know how to do that you can follow this.
After knowing from which file it is rendering you can fix it.
Hope this will help.
Does anyone know how to, without purchasing an addon/extension, add php code to the product and category descriptions? If you try to add it automatically gets commented out when you save, e.g. <!-- <?php echo "test" ?> -->
Workaround: For anyone else.. I used borderless iframe to include an external .php file which contained the php code I needed ....
I want to make a relatively simple modification to OpenCart so that if there are no Special Offers available, or applicable, that the title Special Offers does not display.
If none are available or applicable, currently it will display the heading title on a coloured background which looks odd if there are no special offers to show.
I am guessing the modification needs to be made to /catalog/controller/module/special.php and would be something like.
If special offers > 0 then do this
else
Don't do anything
But I am not sure how to implement this.
I'd be grateful if someone could advise.
Not entirely sure what you are referring to here, but you would be best editing the template not the controller file and using
<?php if($products) { echo $heading_title; } ?>
in place of what is there currently - something like just <?php echo $heading_title; ?>
Also you may find the title is surrounded by <h1> or <h2> tags. If so, just do the same but around the tags, something like
<?php if($products): ?>
<h2><?php echo $heading_title; ?></h2>
<?php endif; ?>
If have a problem with the componentheading and the contentpagetitle.
I got a sectionblog for my articles. The title of the page is a componentheading. The title of the articles (intro) is a contentpagetitle.
If I click on the title of a article, I can see the entire article. The title of the page is now the title of the article (contentpagetitle), and that is good.
The problem is, this title now needs the same layout as the componentheading. But if I do this, the titles of the articles also get this layout in the sectionblog
How can I make sure I got 2 different styles, or the contentpagetitle changes in a componentheading while looking at the full article?
I you don't uderstand what I'm saying just go to http://csm.infowebpreview.be/nl/realisaties, and click on the first title 'Realisatie'. The full article opens and the title 'Realisatie' should be underlined now.
Or this is also correct: if an article is the only article on a page the title should get another layout
Thanks
You can do this by being more specific with the CSS selector -
This one will apply to all of the titles, make this one the one for the main heading with the underline -
h2.contentheadingrealisaties{border-bottom: 1px solid #333}
Then use this to single out the article titles in a listing:
.leadingrealisaties h2.contentheadingrealisaties{border:0;}
Obviously you will need to add in the rest of the CSS, but this will get you started.