I'm trying to insert a custom tag into the page
should this work?
<after css:content-children="#viewlet-below-content-body">
History
</after>
seems only replace allows me to insert/replace a custom tag
<replace css:content-children="#viewlet-below-content-body">
History
</replace>
The before/after rules with only content/content-children is not supported by Diazo, you can only drop or replace. Maybe in a future version.
How about appending your own tag to the theme (with also copying/replacing the children):
<append css:theme="#theme-id-for-viewlet-below-content-body">
History
</append>
Related
The Google tag manager requires me to put one script inside the "head" tag and one at the beginning of the "body" tag.
I want to know what would be considered "best practise" to achieve this.
Are there any other ways than to create a child theme and place the Script in the header.php file?
You can use this plugin for GTM and other scripts:
https://wordpress.org/plugins/duracelltomi-google-tag-manager/
You can use "Insert Headers and Footers by WPBeginner" plugin
https://wordpress.org/plugins/insert-headers-and-footers/
I want to add a custom tag like this:
<myTag>text</myTag>
How do I apply HTML properties to a custom tag?
Navigate to /admin/config/content/formats/manage/full_html
Tick on "Limit allowed HTML tags and correct faulty HTML".
You will get an option to put your custom tag with allowed attributes.
Add your new tag(s) separated by space, eg: <mytag attribute-1 attribute-2>
Hope this helps.
I have added Tag Manager script on my page. So can I add more meta tags to my page.
I means can there will be Tag manager script and meta tags on page or from both of these I should use script or tags?
Thanks
Dalvir
I assume you mean HTML meta tags like keywords, description etc.
You can add them via the tag manager by inserting a custom html/javascript tag that creates additional meta tags via js in the page header. However that will probably won't do you much good, as search engine spiders etc. will probably not pick up meta-tags that have been inserted via javascript and browsers are unlikely to respect tags that have been injected after the page started rendering.
So theoretically it'S possible, but I cannot conceive a use case where it would make sense.
I use this little badboy when I need to populate meta-tags, seems to work like a wee charm.
<script>
var m = document.createElement('meta');
m.name = 'your-name';
m.content = 'your-content';
document.head.appendChild(m);
</script>
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.
Wordpress Tiny MCE editor and WP own editor both has button for <blockquote> . if we select any text and press this buttom then it wraps that text with <blockquote>.....</blockquote>.
I want to change this output to this
<blockquote><div class="quote_start"><div></div></div><div class="quote_end"><div></div></div>...................................</blockquote>
How can i do this manually or is there any wordpress plugin which can do the same?
I want to change behaviour of blockquote button in bot editor TinyMCE and WP own html editor?
I'm not sure you can use this to add that many divs but tinymce's valid elements config parameter does allow you to replace tags.
http://wiki.moxiecode.com/index.php/TinyMCE:Configuration/valid_elements
For instance:
tinyMCE.init({
valid_elements : "blockquote/div[class=quote_start]"
});
Would replace all blockquote tags with a div with the quote_start class.
A better way might be to ignore tinymce here and write a filter for the functions.php file of your theme. http://codex.wordpress.org/Plugin_API/Filter_Reference/the_content. Find all the instances of blockquote and replace it with the code you want.
Maybe adding your own button could also be an option?
Some starting point could be this:
http://www.deliciousdays.com/tinymcebuttons/
and/or this:
http://wiki.moxiecode.com/index.php/TinyMCE:API/tinymce.Editor/addButton
hope it helps? Greetz, t..
If you want the same functionality in two different editors, you're probably better off writing (or looking for) a Wordpress filter that can replace the code. There's this one but it doesn't seem to be able to handle regular expressions (which you would need to replace HTML tags). Maybe this one can do what you need: Text Filter Suite
Getting both TinyMCE and Quicktags requires mods in two places. Here's how to do the Quicktags:
http://website-in-a-weekend.net/extending-wordpress/diy-wordpress-unraveling-quicktags-wordpress-plugins/