How to load the Section in DotLiquid template - asp.net

I am using DotLiquid for the template. I am working themes same as Shopify. I am facing an issue like I am not able to load 'section' tags. How to render the section tag values. I have 'product.liquid' template inside I am using {% section 'product-template' %}. I am getting the error "[SyntaxException: Unknown tag 'section']". Can anyone please help me out. How to fix this issue.

You can look at the DotLiquid source on github
You'll see section is not registered as a tag. You might be able to prompt one of the maintainers to add it but otherwise you could clone the source and add it yourself.

Related

how do i locate files in wordpress by inspecting element a particular element in google chrome?

I want to change some particular line on my Wordpress site which I cannot change in the customization. How do I locate a certain line with inspect element in chrome?
My website is www.Artiana.io and I want to edit this line:
"<h5 class="subscribe-description">Learn more</h5>"
Please, can anyone help me out?
Let me show you how you can use WordPress's hints in html body class to find the php file:
WordPress gives hint in the HTML's body tag that which particular template was used to display this page.
In your case we have following classes in the body tag:
<body class="home page-template page-template-page-templates page-template-page_front-page page-template-page-templatespage_front-page-php page page-id-466 custom-background wp-custom-logo blog-post">
Now there is a specific class which ends with php, which tells that template was used by your theme to build this page. i.e. page-template-page-templatespage_front-page-php
Now it could mean that in your theme folder:
/wp-content/themes/hestia/
There could be sub folder or folders called: **page-template/page-templates** and inside it is page_front-page.php PHP file, which is being used to create this layout. See if you can locate the code you are trying to modify there.

Use an installed block in an existing view drupal

So I have installed a module that gives me a (marque) block.
I can use this block and add it to my website and it works.
But what I want to do is to change the content of the block with a title of a content type.
So instead of:
Marque block: plain text
I want
Marque block: Title emergency messages, if expire date is < now
How can I do this?
Can I get that installed block inside the View of the emergency messages?
Thanks in advance!
You can modify the title of a block by using the hook_block_view_alter(&$data, $block); hook in your custom module.
See the documentation here.

omega theme, file node--type.tpl.php

I'm using the theme of Omega 3. I would like to review the layout of certain fields inside my content type "video". I made so the file: node--video.tpl.php:
<? php print render ($ content ['body']); ?>
yet even this simple statement does not work. Does anyone know the reason? No review of the design of the node with omega 3?
for better debugging, try to install devel module and theme developer module.
Both can be your best friends till you solve this issue.
Hope this helps... Muhammad.
I understand why it did not work. Going up: structure -> content type -> manage display, the fields that I want to print with php hidden. Putting them visible both on the "teaser" that the "default" everything works as it should.

How to add a meta keyword tag in each page of my drupal application?

I want to add a meta keyword tag which have to come with every pages within my drupal website. How to do that ?
It's too easy just use the meta tag module .
And for drupal6 i found this: Meta tags Node Type
Welcome
It might need a bit of tweaking but I built a module that does this.
https://github.com/SpaceBeers/Drupal-7-Meta-Tags-Module
It also lets you set a site wide default title and description which can be overridden for each node. You can select which content types this appears on.
It'd be nice to get some feed back on it.
Just add The code given below at the top of your template.php file (Custom).
drupal_set_html_head('<meta name="keywords" content="CustomKeyword" />');
Done.

admin template selection is missing on page creation in wordpress 3.2.x

I am using WordPress 3.2.1 ,
Page template selection drop down is missing on Pages (Add,Edit)
wp-admin > Pages >Add New > Page Attributes
I Edit the Template Page Default page as below code
/*
Template Name: New Template
*/
But still the template drop down no visible , my older version of WordPress it display by default.
Following is the screen shot for more idea
I solved this problem solved by adding the typical following code:
/*
Template Name: Custom
*/
Don't add any spaces after Name:
It'll work if you use template name: as well.
It might help someone: check if your index.php file is in place.
If it's not there, wordpress treats the template as corrupt and it doesn't display the template selection.
This should be simple to troubleshoot. The requirements for the page template to work are straight forward:
The template needs the page title in the top of the file like you've shown (the title needs to be wrapped in a PHP tag, you probably just didn't add it with your example bu I want to make sure you havne't overlooked it):
<?php
/*
Template Name: Custom
*/
?>
The second requirement is that the file is in the root of the theme folder.
With those two requirements in place, it should work. If it isn't working you nave a few possible issues. I list a few off the top of my head:
You might need to re-install WordPress in-case a file was corrupted
during your last update.
It's possible someone has altered the WP-Admin layout using users
roles.
That's all I can thing of at the moment, let me know how it turns out.
I had the same issue. It actually turned out to be a missing style.css file within the template directory in my case.
This happens because the get_post_templates() in class-wp-theme.php first checks for errors. If it finds any then it returns an empty array (no templates are displayed).
A side effect of this is that saving a page would clear the existing template and use the page.php instead.
So in short if the errors() method of your theme returns any errors then no templates dropdown.
hope that helps someone.
Same issued, I found out that in appearance panel in your WordPress dashboard the stylesheet is missing. You shouldn't rename the style.css in your theme folder.
Not sure if this will help anyone, but we solved the problem by disabling our theme and re-enabling it again. We had some other theme folders in the theme directory that we weren't using so we deleted those out as well. good luck, it's a really random problem to solve!
yeah!template dropdown not showing because you have no template So how to solve this::---
1 create template folder in theme
2 create a template in this folder
like:-
<?php /* Template Name: Home */ echo "template"; ?>
and check-in page dropdown will be there.

Resources