I have a web site using rmarkdown and distill, and want to include a link to another page on the site.
I tried:
Some content on this topic and pointers to relevant literature will be provided under
![_Learning More_ for Chapter 7](learning_more.html).
But when I build the site, I get an image of the page, not a standard hyperlink. What is wrong?
Related
I'm building a site with the new version of Wagtail (2.0) and when I try to add an internal link (a link to another page in my website) in a blog post using the Rich Text Editor, the hyperlink tags are stripped out and just the link text is showing. The code that gets rendered is <a id="5" linktype="page">sample page</a>.
If I add an external link, and set it to /sample-page/ then the hyperlink works as expected.
Does anyone know why this is happening?
When you output a rich text field on your template, you need to run it through the |richtext template filter:
http://docs.wagtail.io/en/v2.0.1/topics/writing_templates.html#rich-text-filter
This is because rich text is stored as a 'symbolic' variation of HTML, where items such as page links and images are represented as IDs rather than full URLs - this ensures that they won't break if a page is moved or renamed, for example. The |richtext filter is necessary to translate that symbolic HTML back to real HTML.
How we can create content section in xcart like we create in wordpress via widget ? is there any option like this ? i want to make home page with 4 section with image content and link them to particular page .
This differs depending on X-Cart version. There are two major versions now: X-Cart 4 and X-Cart 5. They are very different and in order to give you any advice it is better to now what X-Cart version you are using.
Alex Mulin is right, it's kinda difficult to answer your question without such specific info as your X-Cart version. Yet I'll try to. In both cases the webmaster mode can help you do the trick. See video tutorials below.
Webmaster mode in X-Cart 4 :
https://www.youtube.com/watch?v=9QrpH4cQGpE
Webmaster mode in X-Cart 5:
http://devs.x-cart.com/en/webinars_and_video_tutorials/using_webmaster_mode_in_x-cart_5.html
If they don't work for you for some reason, try to ask the same question but be a bit more specific, or at least provide the store URL and I will be able to check the version.
What you are trying to do is skin-dependent and each skin has its own sections.
In order to find the files that you need to edit, go to Admin Panel>Settings>General Settings>Enable debugging console and check its box.
When checked, if you open your store, it opens a popup that that shows you the smarty templates loaded (make sure your browser does not block popups).
You can then change the smarty template files in order to add whatever you want. If you are not familiar with them, they are basically extended HTML files with some basic commands (if/for/etc.) and you can get stuff from PHP files in them as well. You can use xcart webmaster mode to edit those files too as mentioned by other answers.
This video can also be useful for you: https://www.youtube.com/watch?v=vN__DZrNrRM (X-Cart - Storefront Design and Layout)
And here's some XCart documentation on how to customize store front and skins:
http://help.x-cart.com/index.php?title=X-Cart:Customizing_storefront
http://help.x-cart.com/index.php?title=X-Cart:Editing_Skin_Files
I have locally installed opencart into the ".../shop" part of my website. Now I want to fit my site header and footer to appear around the site.
Please can people help advise the best way of doing this. I have a header.php and footer.php included on ever page of my site but am not clear how to implement this on the shop page.
I am thinking that there is going to be conflicts especially linking to other pages via the shop section. Will the hrefs in my header in the shope section need to direct differently?
You'd want to goto your catalog/view/theme/default/template/common/header.tpl and footer.tpl and make the changes.
I can't find the specific instructions for adding a Like button to a page without including open graph tags on that page. The page in question is a third-party registration site, and we don't have access to the page header to add meta tags. I believe that there was an older version that didn't use the Open Graph (before it existed?)
Any help or advice appreciated!
You can add a like button without Open Graph tags, however you can not set the title, description and image.
The old version of share buttons is deprecated and will be unsupported soon.
How can I include a page from magnolia into a magnolia template script?
In the template script with I can access data from a specific page, but how can I load that page into the template?
Let's say I have 2 pages each with its own template. Page 1 contains in its tree page 2. I want to include in the template script of page 1, page 2, but doesn't work.
Thank you very much :)
UPDATED
What I actually want to do is include my header in all of my project's pages. But I don't want to put it as a paragraph, because if I ever want to change my header, I'll have to edit all the project's pages.
So what I try to do and I don't know if this is the correct approach is to create a page template for the header. This template won't include any , or css, it's just the code for the header.
The next thing I want to do is create a page in magnolia with that model to be the header.
Next I'd like to include the page I've just created in my main template model for the project, but I can't figure how to do that.
I am new to Magnolia cms and initially I tried creating my demo site using stk. The only problem was that I couldn't use jsp as a scripting language, or at least I couldn't find any solution on the internet. I don't really know freemarker, but that's not really a big problem. I'm really reluctant in using freemarker because maybe in the future in a more complex project I might need some features that freemarker doesn't support, but jsp does. I'd like to build my site using jsp if that's possible with magnolia.
I'm sorry for this long update, but if anyone has any suggestions on what a best practice could be and if I could implement what I want in jsp I would be really grateful.
Thanks again for you time :)
If you're using the STK then see this guide on content-reuse.
If not have a look at the cms tag-lib, especially the tags cms:loadPage and cms:setNode with which you can get a piece of content and set it as a JSP/JSTL variable and then render it using cms:includeTemplate.
A common scenario is to 'inherit' content from the parent page, the header is an excellent example of this. What you do is for an area you walk up the content hierarchy and render everything from the parent pages in their area with the same name. This way the header which you've only added to the top page is included in all its children.
Another option is to a have special page which simply holds things to be included in other pages. Like header, footer and banners that should go in the side pane of some pages.
Including a page within another page doesn't really work. Page 2 already has its own <html> tags, its own <script> tags, and its own CSS, so including it wholesale into another page just simply doesn't make sense.
You do, however, have a couple of options:
Use an iframe. This will allow you to include the entirety of Page 2 in a region of Page 1.
More recent versions of Magnolia will allow you to render an individual paragraph, which you could then include in another page. (For example, you can see a single paragraph from http://demopublic.magnolia-cms.com/demo-project/about/subsection-articles.html at http://demopublic.magnolia-cms.com/demo-project/about/subsection-articles/article/main/0.html.) This requires knowing a bit about the way the data is structured, but is a pretty useful way to be able to selectively extracts bits of a page.
You can use the Magnolia API in your model class to pull data from sub-pages, and then make it available to your view template. This is the approach the STK uses to build teasers that include content from the pages they reference, and is probably the most powerful and flexible approach, but it does require actually writing some Java code. (See http://documentation.magnolia-cms.com/templating/stk/templating.html and http://documentation.magnolia-cms.com/reference/templating.html for details of how to use this approach.)
(Added after question was edited) The footer functionality that's included with the STK does almost exactly this. You might be interested to take a look at that and see how it's implemented there.
Hope that helps a bit!