
How to call dedecms friendly links in different columns?
dedecmsHow to call different friendly links on different column pages. I searched online for a long time, and all of them talked about how to call the homepage and column pages respectively. Let me share with you a little trick and why it is implemented in this way. There is no need to say more about the reasons.
Recommended learning: 梦Weavercms
In fact, using object and javascript to call external files can also call different friendship links in different columns, which is equivalent to calling friendship in different columns. Link file, {dede:field.typeid/} to get the ID of the current column. When calling friendly links through this method, it is considered friend link deception and is not recommended. The tags of dedecms cannot be applied (except Channelartlist), which brings some trouble to the implementation, but there is another tag that can help, the sql tag. The specific operation is as follows:
1. Backend-Core-Website Column Manage and record the column name and column ID.

2. Backend-Module-Friendly Links-Website Type Management, edit the website type to make the website type name and ID consistent with the column name and ID.

3. In the column template, write the following code:
dede:sql sql="select url,webname from dede_flink where id = (select id from dede_flinktype where typename=~typename~)" }<a href="[field:url/]">[field:webname/]</a>{/dede:sql}4. As for the homepage link, you can directly enter it in the website type management Add a "Homepage", and then directly add typeid='Website Type ID' in the homepage template
You're done! It's very simple, but I couldn't find it online. This situation is suitable for sites with few columns. If there are more columns, it will look a bit stupid. It can also be achieved through secondary development of PHP. Here is a simple sharing and backup with everyone.
The above is the detailed content of How to implement dedecms friendly link sub-column call. For more information, please follow other related articles on the PHP Chinese website!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

mPDF
mPDF is a PHP library that can generate PDF files from UTF-8 encoded HTML. The original author, Ian Back, wrote mPDF to output PDF files "on the fly" from his website and handle different languages. It is slower than original scripts like HTML2FPDF and produces larger files when using Unicode fonts, but supports CSS styles etc. and has a lot of enhancements. Supports almost all languages, including RTL (Arabic and Hebrew) and CJK (Chinese, Japanese and Korean). Supports nested block-level elements (such as P, DIV),

SublimeText3 English version
Recommended: Win version, supports code prompts!

SublimeText3 Chinese version
Chinese version, very easy to use

Dreamweaver Mac version
Visual web development tools

VSCode Windows 64-bit Download
A free and powerful IDE editor launched by Microsoft





