Skip to content
View in the app

A better way to browse. Learn more.

thirty bees forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Question: Admin ShortCodes? BaseURL for static pages or TB Blog URLs?

Featured Replies

Hi

I've been creating static links to TB Blog pages on the Main Menu, but because I'm working on three different environments, the base URLs will be different.
So when I move the site from Local to Staging and eventually to Live, I'll need to remember to update the base URLs every time.

I've noticed in the SEO section that there are a few "shortcodes" being used, like: 

{categories:/}{rewrite}{/:selected_filters}

Is there one for baseurl that can be used for a URL in Menu admin?
Like: URL: {baseurl}/blog/myblogpostpage

Also, is there a list of all the 'secret' shortcodes for PS 1.6 / TB for Admin (even product admin)?
I'm aware of some nice Smarty variables for the front-end, but here I'm specifically interested in something similar for the BO Admin.

 

 

34 minutes ago, Theo said:

Is there one for baseurl that can be used for a URL in Menu admin?
Like: URL: {baseurl}/blog/myblogpostpage

Not sure if I understand right. Why is /blog/myblogpostpage not working?

  • Author

Hi 

Because the URL you've given will give you a 404 on Local (takes you all the way to the localhost root)
My test blog post name is 'this-is-a-test'. So using your URL it would be /blog/this-is-a-test:

622599982_pathissueroot.png.55584e463831f3ca5e543243880f6918.png

Also, if you try something like this (no initial forward slash):
blog/this-is-a-test
It works until you browse the site for a bit, then try to access the link on the menu again -  then you get this:

path issue.png

path issue 2.png

Edited by Theo

Hello, In SEO&Urls Panel (adminXXX/index.php?controller=AdminMeta) Did you add "blog" in rewrite column "module-beesblog-post" module?

Screenshot_2019-10-04 SEO URLs • Futurheli.png

Edited by Pierrox15
format ; I hate wysiwig textarea

  • Author
10 minutes ago, Pierrox15 said:

Hello, In SEO&Urls Panel (adminXXX/index.php?controller=AdminMeta) Did you add "blog" in rewrite column "module-beesblog-post" module? [![Screenshot_2019-10-04 SEO URLs • Futurheli.png](//forum.thirtybees.com/applications/core/interface/js/spacer.png)](https://forum.thirtybees.com/uploads/monthly_2019_10/2050888777_Screenshot_2019-10-04SEOURLsFuturheli.png.962fd0fa6dfef4501ab3f2d614885781.png)

Screenshot_2019-10-04 SEO URLs • Futurheli.png

Hi

I've tried your suggestion, but still not working...

Well it really depends on the context you want to generate such a link. It's different in smarty than in php file. I dont know what URL in Menu admin means.

  • Author

Hi

To clarify:
This is in the context of adding a static link to a blog post in the Main Menu (Admin) or anywhere else in Admin.
So whether I'm on the 'Edit product details page' or creating a link in the Main Menu to a static blog post URL, I'd like to be able to do the following:
{baseurl}/blog/blog-post-name

 

 

Edited by Theo

baseUrl of  your shop is manage in ShopUrl,  it is the basepath of your install
ex: localhost/myshop  yo don't need rewrite module for that.

After that you can configure rewrite for each controller in the SEO&Url Tab (screenshot)
ex ?controller=mycontroller  become /mycontroller  and you *need* apache mod rewrite for that

If i understand your problem, I will say: there is no easy way to maintain link in front Main menu, because module topmenu doesn't have entry for blog controllers. you would write an issue

Here:

https://github.com/thirtybees/blocktopmenu

Or here:

https://github.com/thirtybees

 

I don't think shortcode exist for that. but it will very nice to have somethink like this {product->id}, {blogpost->id} or {category->id} to use in form to generate url.

 

Edited by Pierrox15

  • Author

Is there no way to include this baseUrl or ShopUrl in a tag somehow that we can then reuse wherever in Admin (product edit, URL link)?
Similar to Smarty's {$baseurl}
As creating static links to blog posts for example is going to become very difficult to maintain imo...

@Theo Right now it's not possible.

But you are right, that it's hard to maintain links like that. For our own shop I have created a little Shortcode System. Which replaces links in FO like [link blog="12"] or [link product="34"]. But this won't work on other system as it depends on blog module for example. 

  • Author
26 minutes ago, wakabayashi said:

@Theo Right now it's not possible.

But you are right, that it's hard to maintain links like that. For our own shop I have created a little Shortcode System. Which replaces links in FO like [link blog="12"] or [link product="34"]. But this won't work on other system as it depends on blog module for example. 

Thanks for the feedback... Darn, this kinda sucks. Will create feature request in near future...

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.