Add Tag Cloud to WowChemy theme - wowchemy

I am trying to add tags to the home page of my website. I added the tag_cloud based on the documentation here. I however do not see the tag_cloud added to my home page.
What could I be missing?
I had previously created a github question for adding tags in my wowchemy site, but it was closed without comment.
Example page where I have added Tag_cloud:(https://raw.githubusercontent.com/ajitgoel/hugo-blog-theme/main/content/home/index.md)
---
# Homepage
type: widget_page
widget: tag_cloud
# Homepage is headless, other widget pages are not.
headless: true
content:
# Choose the taxonomy from `config.yaml` to display (e.g. tags, categories)
taxonomy: tags
# Choose how many tags you would like to display (0 = all tags)
count: 20
design:
# Minimum and maximum font sizes (1.0 = 100%).
font_size_min: 0.7
font_size_max: 2.0
---

Related

In Opencart 3 under PHP 8 how do I call module to show in another page

I have seen on this site the post re calling a module on needed page. I have tried to use this code to solve a problem. This code does not appear to work for me.
What I have is a module that places a label over each product depending on its status. It works well on products throughout site. However I have a module which calls all products on to one page. I want the label to appear on the products on this all products page.
Banner on product
The code I used in catalog/controller for the all product extension from previous post here was (382 is the label module number):
$this->load->model('382');
$my_variable = $this->model_setting_module->getModule('382');
$data['any_variable'] = $my_variable['any_variable'];
On Template page:
{{ any_variable }}
How can I get the module to be apply the label to the custom all products page?
As always help appreciated
Create new module with name: "my_module" and you can call it in your "another_module" controller file:
$data['my_module'] = $this->load->controller('extension/module/my_module');
and in corresponding "another_module" template file you can retrieve it:
{{ my_module }}

HREF Class changing on every page

I am working to scrape the website:- "https://www.moglix.com/automotive/car-accessories/216110000?page=101" NOTE: 101 is the page number and this site has 783 pages.
I wrote this code to get all the URL's of the product mentioned on the page using beautifulsoup:-
prod_url = []
for i in range(1,400):
r = requests.get(f'https://www.moglix.com/automotive/car-accessories/216110000?page={i}')
soup = BeautifulSoup(r.content,'lxml')
for link in soup.find_all('a',{"class":"ng-tns-c100-0"}):
prod_url.append(link.get('href'))
There are 40 products on each page, and this should give me 16000 URLs for the products but I am getting 7600(approx)
After checking I can see that the class for a tag is changing on pages. For Eg:-
How to get this href for all the products on all the pages.
You can use find_all method and specified attrs to get all a tags also further filter it by using split and startswith method to get exact product link URL's
res=requests.get(f"https://www.moglix.com/automotive/car-accessories/216110000?page={i}")
soup=BeautifulSoup(res.text,"html.parser")
x=soup.find_all("a",attrs={"target":"_blank"})
lst=[i['href'] for i in x if (len(i['href'].split("/"))>2 and i['href'].startswith("/"))]
Output:
['/love4ride-steel-tubeless-tyre-puncture-repair-kit-tyre-air-inflator-with-gauge/mp/msnv5oo7vp8d56',
'/allextreme-exh4hl2-2-pcs-36w-9000lm-h4-led-headlight-bulb-conversion-kit/mp/msnekpqpm0zw52',
'/love4ride-2-pcs-35-inch-fog-angel-eye-drl-led-light-set-for-car/mp/msne5n8l6q1ykl',..........]

typo3 9.5 - how to get rid of gray header box?

When I use my h1 and h2 styles in a text content element in typo3 9.5, they get nicely displayed as I want.
However when I use the header field of the element, I get this grey box and not my h1 format.
How can I configure typo3 to show h1 style there?
If you use fluid styled content (FSC) or packages which are using FSC (like bootstrap package) you will find the templates of your content elements (CE) in these extensions, from where you can copy it to your site extension and after adding your path to the paths list your modified template is used to render that CE.
This is the typoscript configuration to modify the rendering of the extension bootstrap_package:
lib {
contentElement {
layoutRootPaths {
// 0 = EXT:bootstrap_package/Resources/Private/Layouts/ContentElements/
10 = EXT:my_site_extension/Resources/Private/Layouts/ContentElements/
}
partialRootPaths {
// 0 = EXT:bootstrap_package/Resources/Private/Partials/ContentElements/
10 = EXT:my_site_extension/Resources/Private/Partials/ContentElements/
}
templateRootPaths {
// 0 = EXT:bootstrap_package/Resources/Private/Templates/ContentElements/
10 = EXT:my_site_extension/Resources/Private/Templates/ContentElements/
}
}
}
The entries with 0 = are set by the ext:bootstrap_package (or similar by ext:fluid_styled_content) and show you the path to the templates which are used without your override.
The entries with 10 = (you could use any higher number to give preference to your templates) should show to the folders in your site extension (ext:my_site_extension), where you hold your modified copies.
You only need to copy templates you modify as the original paths are fallback to any template file which is referenced as template, layout or partial. Keep an eye on the paths as those files can be referenced with a (relative) path.
EDIT:
For FSC the rendering for a specific CE is done with a template of the same name in the template folder configured in typoscript (see above)
These files normally contain a call to the same layout file (Layouts/Default.html) which renders the header with the partial Header/All and different other html for spacing and anchors.
In the partial Header/All we have further partials which render the fields header, subheader and date if given with appropriate partials.
Note the additional arguments to these partials: layout, positionClass, link, default which will influence the appearance of the header.
Maybe your unusual appearance is given because there is a special header_layout in your records.
Or another extension already has overwritten the default templates (partials) to get those boxed headers instead of the h1-h6 HTML tags which are used in the FSC extension.

How to increase width of docfx article page (based-on default theme)?

I am using docfx 2.43.3 with own theme (based on default theme). This is the result: http://docs.example.com/.
In this article page, http://docs.example.com/articles/add_more.html.
How would you increase the width of this page (all page and main block)?
As a possible first step, you could try changing all containers to container-fluid.
var containers = $(".container");
containers.removeClass("container");
containers.addClass("container-fluid");

Page number in jsreport

Is it possible to display page number in jsreport?
I couldn't find this either on the homepage of the tool nor by googling.
Many thanks in advance!
I assume you ask for page numbers in a pdf report created by phantom-pdf recipe...
You can use special tags {#pageNum} and {#numPages} in template.phantom.header for this:
<div style='text-align:center'>{#pageNum}/{#numPages}</div>
Note you can use also javascript in header/footer to customize visibility or value of the page numbers.
<span id='pageNumber'>{#pageNum}</span>
<script>
var elem = document.getElementById('pageNumber');
if (parseInt(elem.innerHTML) <= 3) {
//hide page numbers for first 3 pages
elem.style.display = 'none';
}
</script>
Documentation here
UPDATE 2022:
jsreport now uses primarily chrome for generating pdf. You can now add page numbers using native headers or in complex cases using pdf utils
pdf utils based header playground example can be found here.